diff mbox series

[OpenWrt-Devel,ubus,07/16] examples: remove dead increments

Message ID 20191219221125.22646-8-ynezz@true.cz
State Accepted
Delegated to: Petr Štetiar
Headers show
Series GitLab CI, tests, fuzzing, fixes and improvements | expand

Commit Message

Petr Štetiar Dec. 19, 2019, 10:11 p.m. UTC
Fixes following error reported by clang-9 analyzer:

 examples/server.c:244:2: warning: Value stored to 'argc' is never read
        argc -= optind;
        ^       ~~~~~~

 examples/server.c:245:2: warning: Value stored to 'argv' is never read
        argv += optind;
        ^       ~~~~~~

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 examples/client.c | 3 ---
 examples/server.c | 3 ---
 2 files changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/examples/client.c b/examples/client.c
index 7ef566347e54..aae09f480af4 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -220,9 +220,6 @@  int main(int argc, char **argv)
 		}
 	}
 
-	argc -= optind;
-	argv += optind;
-
 	uloop_init();
 
 	ctx = ubus_connect(ubus_socket);
diff --git a/examples/server.c b/examples/server.c
index 004eaf3a7ae1..0913fff0d016 100644
--- a/examples/server.c
+++ b/examples/server.c
@@ -241,9 +241,6 @@  int main(int argc, char **argv)
 		}
 	}
 
-	argc -= optind;
-	argv += optind;
-
 	uloop_init();
 	signal(SIGPIPE, SIG_IGN);