diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-11-04 18:21:44 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-11-14 17:11:34 +0100 |
commit | af59f86a0db914db60243563956f20e2c0850213 (patch) | |
tree | ec91bd4e257368c04a967ba655ad0aa8b4d9ca3c /list.c | |
parent | 1637d29186923bf75c015a9c27e3bbfc951a488c (diff) | |
download | uci-af59f86a0db914db60243563956f20e2c0850213.tar.gz |
iron out all extra compiler warnings
gcc 9.1 on x86/64 has reported following issues:
list.c:140:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
file.c:572:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
file.c:850:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
file.c:865:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
delta.c:199:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
parse.c:80:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
parse.c:81:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
file.c:572:51: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
file.c:850:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
file.c:865:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
delta.c:199:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
parse.c:80:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
parse.c:81:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
ucimap.c:146:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:151:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:243:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:247:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:254:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:258:9: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:285:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:363:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:563:12: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:753:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ucimap.c:879:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'list.c')
-rw-r--r-- | list.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -137,7 +137,7 @@ static unsigned int djbhash(unsigned int hash, char *str) int i; /* initial value */ - if (hash == ~0) + if (hash == ~0U) hash = 5381; for(i = 0; i < len; i++) { @@ -149,7 +149,7 @@ static unsigned int djbhash(unsigned int hash, char *str) /* fix up an unnamed section, e.g. after adding options to it */ static void uci_fixup_section(struct uci_context *ctx, struct uci_section *s) { - unsigned int hash = ~0; + unsigned int hash = ~0U; struct uci_element *e; char buf[16]; |