projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2e5442
)
examples: remove dead increments
author
Petr Štetiar
<ynezz@true.cz>
Wed, 11 Dec 2019 12:31:59 +0000
(13:31 +0100)
committer
Petr Š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
patch
|
blob
|
history
examples/server.c
patch
|
blob
|
history
diff --git
a/examples/client.c
b/examples/client.c
index 7ef566347e540f8d9e096552b8244f6cc3a0e5f5..aae09f480af4747918e60ff14b4b8f6084ce10a0 100644
(file)
--- 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 004eaf3a7ae183ac650b417b387df55c46359d41..0913fff0d0166a16906993a9286f7fe1041b82f0 100644
(file)
--- 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);