examples: remove dead increments
authorPetr Štetiar <ynezz@true.cz>
Wed, 11 Dec 2019 12:31:59 +0000 (13:31 +0100)
committerPetr Štetiar <ynezz@true.cz>
Mon, 16 Dec 2019 22:39:16 +0000 (23:39 +0100)
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
examples/server.c

index 7ef566347e540f8d9e096552b8244f6cc3a0e5f5..aae09f480af4747918e60ff14b4b8f6084ce10a0 100644 (file)
@@ -220,9 +220,6 @@ int main(int argc, char **argv)
                }
        }
 
-       argc -= optind;
-       argv += optind;
-
        uloop_init();
 
        ctx = ubus_connect(ubus_socket);
index 004eaf3a7ae183ac650b417b387df55c46359d41..0913fff0d0166a16906993a9286f7fe1041b82f0 100644 (file)
@@ -241,9 +241,6 @@ int main(int argc, char **argv)
                }
        }
 
-       argc -= optind;
-       argv += optind;
-
        uloop_init();
        signal(SIGPIPE, SIG_IGN);