netfilter.c: use literal string for printf format
TL;DR: this allows to check if printf argument types are valid. Apparently, gcc is not able to check if the printf arguments are in sync with the format string, it a string is not a literal. This can be seen by compiling the code with -Wformat-nonliteral: CC criu/netfilter.o criu/netfilter.c: In function ‘nf_connection_switch_raw’: criu/netfilter.c:80:4: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] dip, (int)dst_port, sip, (int)src_port); Unfortunately we can't just add -Wformat-nonliteral to CFLAGS as there is at least one other place in the code what uses non-literal string as a format string for printf-like function. In this very case, though, there is no need to use a non-literal, so change it to a define. Signed-off-by:Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment