diff mbox series

tools: Fix some dead assignments

Message ID 20210726153716.68819-1-christian.storm@siemens.com
State Accepted
Headers show
Series tools: Fix some dead assignments | expand

Commit Message

Christian Storm July 26, 2021, 3:37 p.m. UTC
Fix some dead assignments found by Clang.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 tools/swupdate-progress.c      | 2 --
 tools/swupdate-sendtohawkbit.c | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/swupdate-progress.c b/tools/swupdate-progress.c
index e3f010b..716c8fb 100644
--- a/tools/swupdate-progress.c
+++ b/tools/swupdate-progress.c
@@ -337,8 +337,6 @@  int main(int argc, char **argv)
 
 				if (psplash_ok && ((msg.cur_step != curstep) || (msg.cur_percent != percent))) {
 					psplash_progress(psplash_pipe_path, &msg);
-					curstep = msg.cur_step;
-					percent = msg.cur_percent;
 				}
 				curstep = msg.cur_step;
 				percent = msg.cur_percent;
diff --git a/tools/swupdate-sendtohawkbit.c b/tools/swupdate-sendtohawkbit.c
index 06a85ea..763e5b3 100644
--- a/tools/swupdate-sendtohawkbit.c
+++ b/tools/swupdate-sendtohawkbit.c
@@ -87,9 +87,9 @@  int main(int argc, char *argv[]) {
 	}
 
 	if (i > 5)
-		written = snprintf(buf, size, "]}");
+		(void)snprintf(buf, size, "]}");
 	else
-		written = snprintf(buf, size, "}");
+		(void)snprintf(buf, size, "}");
 
 	fprintf(stdout, "Sending: '%s'", msg.data.procmsg.buf);
 	msg.data.procmsg.len = strnlen(msg.data.procmsg.buf, sizeof(msg.data.procmsg.buf));