[PATCH firmware-utils 1/4] srec2bin: drop unused "dum" variable

Rafał Miłecki zajec5 at gmail.com
Thu Feb 22 22:18:36 PST 2024


From: Rafał Miłecki <rafal at milecki.pl>

This fixes:
src/srec2bin.c: In function ‘checksum’:
src/srec2bin.c:297:7: warning: variable ‘dum’ set but not used [-Wunused-but-set-variable]
   int dum;
       ^~~

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 src/srec2bin.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/srec2bin.c b/src/srec2bin.c
index ad4222d..9a88909 100644
--- a/src/srec2bin.c
+++ b/src/srec2bin.c
@@ -294,7 +294,6 @@ int checksum(char *cp,int count)
 {
   char *scp;
   int cksum;
-  int dum;
 
   scp=cp;
   while(*scp)
@@ -309,8 +308,6 @@ int checksum(char *cp,int count)
   while(count)
   {
     cksum += gh(scp,2);
-    if (count == 2)
-        dum = ~cksum;
     scp += 2;
     count--;
   }
-- 
2.35.3




More information about the openwrt-devel mailing list