diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-05-07 17:47:32 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-05-10 12:02:53 +0000 |
commit | a33d7ebb046f3a1b08b5ffd5b5ceadb8bb5720a2 (patch) | |
tree | 2009599b03b86ef3cc8881522d8e92c07e6732fa /etc/profile-a-l/guvcview.profile | |
parent | always log seccomp errors (#5110) (diff) | |
download | firejail-a33d7ebb046f3a1b08b5ffd5b5ceadb8bb5720a2.tar.gz firejail-a33d7ebb046f3a1b08b5ffd5b5ceadb8bb5720a2.tar.zst firejail-a33d7ebb046f3a1b08b5ffd5b5ceadb8bb5720a2.zip |
fzenity: fix dead store
As caught by the Clang Static Analyzer:
$ make clean && NO_EXTRA_CFLAGS="yes" scan-build --status-bugs make -C src/fzenity
[...]
main.c:77:10: warning: Value stored to 'ptr' is never read [deadcode.DeadStores]
return ptr++;
^~~~~
1 warning generated.
[...]
scan-build: Analysis run complete.
scan-build: 1 bug found.
The above increment is a no-op, as it is equivalent to
`return ptr; ptr++;`.
For it to make any difference, the prefix increment operator would have
to be used in place of the postfix one:
return ++ptr;
Which would be equivalent to `++ptr; return ptr;`.
But in order to fix the warning (and CI) while avoiding to change the
current behavior, just remove the operator instead.
Added on commit 1cdfa6f95 ("more on firecfg --guide: fzenity",
2022-04-25).
Diffstat (limited to 'etc/profile-a-l/guvcview.profile')
0 files changed, 0 insertions, 0 deletions