Turn -Wformat to -Werror=format, got some wrong habits
This commit is contained in:
parent
90c1341626
commit
68beb519b4
4 changed files with 4 additions and 3 deletions
|
@ -158,6 +158,7 @@ dnl AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CPPFLAGS="$CPPFLAGS -fno-st
|
|||
dnl AX_CHECK_COMPILE_FLAG([-Werror=shorten-64-to-32], [CFLAGS="$CFLAGS -Werror=shorten-64-to-32"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
|
||||
dnl AX_CHECK_COMPILE_FLAG([-Wno-conversion], [CFLAGS="$CFLAGS -Wno-conversion"])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=format], [CFLAGS="$CFLAGS -Werror=format"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-date-time], [CFLAGS="$CFLAGS -Wno-date-time"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-shadow], [CFLAGS="$CFLAGS -Wno-shadow"])
|
||||
AX_CHECK_COMPILE_FLAG([-Wno-vla], [CFLAGS="$CFLAGS -Wno-vla"])
|
||||
|
|
|
@ -1533,7 +1533,7 @@ static void handle_incoming_slpd_packet(listen_socket_t *ls, void *pkt, struct s
|
|||
fng[86] = '\00';
|
||||
|
||||
if (mav == 0 && miv <= 2) {
|
||||
logger(DEBUG_TRAFFIC, LOG_ERR, "Got SLPD packet node:%s port:%d %d.%d <%s> from %s (len: %d)", nodename, port, mav, miv, fng, addrstr, datalen);
|
||||
logger(DEBUG_TRAFFIC, LOG_ERR, "Got SLPD packet node:%s port:%d %d.%d <%s> from %s", nodename, port, mav, miv, fng, addrstr);
|
||||
|
||||
node_t *n = lookup_node(nodename);
|
||||
if (!n) {
|
||||
|
|
|
@ -384,7 +384,7 @@ int setup_slpd_in_socket() {
|
|||
closesocket(nfd);
|
||||
return -1;
|
||||
}
|
||||
logger(DEBUG_STATUS, LOG_INFO, "SLPD multicast group joined on %s ready (%d)", c_iface->value);
|
||||
logger(DEBUG_STATUS, LOG_INFO, "SLPD multicast group joined on %s ready", c_iface->value);
|
||||
c_iface = lookup_config_next(config_tree, c_iface);
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ static bool update(int fd) {
|
|||
ns->known = false;
|
||||
|
||||
while(recvline(fd, line, sizeof line)) {
|
||||
int n = sscanf(line, "%d %d %s %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64" %d", &code, &req, name, &in_packets, &in_bytes, &out_packets, &out_bytes, &myself);
|
||||
int n = sscanf(line, "%d %d %s %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64" %d", &code, &req, name, &in_packets, &in_bytes, &out_packets, &out_bytes, (int *)&myself);
|
||||
|
||||
if(n == 2)
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue