summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e0ec7ff)
raw | patch | inline | side by side (parent: e0ec7ff)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 8 Jul 2017 09:50:23 +0000 (11:50 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 8 Jul 2017 09:50:23 +0000 (11:50 +0200) |
CC src/chrony.lo
src/chrony.c:355:30: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (!isalnum(c) || j + 1 >= p_buf_size)
~~~~~ ^ ~~~~~~~~~~
src/chrony.c:359:9: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (j < p_buf_size)
~ ^ ~~~~~~~~~~
src/chrony.c:355:30: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (!isalnum(c) || j + 1 >= p_buf_size)
~~~~~ ^ ~~~~~~~~~~
src/chrony.c:359:9: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (j < p_buf_size)
~ ^ ~~~~~~~~~~
src/chrony.c | patch | blob | history |
diff --git a/src/chrony.c b/src/chrony.c
index a5e85a8a84b1a42e2a2eff7384027c397c3c9fb0..74dae52d6fd04dac78704ee62f3c56bc1c1308e0 100644 (file)
--- a/src/chrony.c
+++ b/src/chrony.c
}
static void nreftostr(uint32_t nrefid, char *p_buf, size_t p_buf_size) {
- int i, j, c;
+ int i, c;
+ size_t j = 0;
- for (i = j = 0; i < 4; i++) {
+ for (i = 0; i < 4; i++) {
c = ntohl(nrefid) << i * 8 >> 24;
if (!isalnum(c) || j + 1 >= p_buf_size)
continue;