[PATCH 1/7] localtmn_scan: remove useless 's' increment

From: Roman I Khimov <khimov_at_altell.ru>
Date: Fri, 13 Mar 2015 17:24:20 +0300

Cppcheck warns us here: "Assignment of function parameter has no effect
outside the function. Did you forget dereferencing it?"

Clang's scan-build also doesn't like it: "Value stored to 's' is never read"

And it actually is useless, so just drop it.
---
 src/libstddjb/localtmn_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libstddjb/localtmn_scan.c b/src/libstddjb/localtmn_scan.c
index 087c642..fa5cbcd 100644
--- a/src/libstddjb/localtmn_scan.c
+++ b/src/libstddjb/localtmn_scan.c
_at_@ -14,7 +14,7 @@ unsigned int localtmn_scan (char const *s, localtmn_t *l)
   {
     register unsigned int b = uint32_scan(s, &m.nano) ;
     if (!b) return 0 ;
-    s += b ; n += b ;
+    n += b ;
   }
   *l = m ;
   return n ;
-- 
2.1.4
Received on Fri Mar 13 2015 - 14:24:20 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC