You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/net
Stefan Weil via ac14949821 Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues
With the G_GNUC_PRINTF function attribute the compiler detects
two potential insecure format strings:

../../../net/stream.c:248:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    qemu_set_info_str(&s->nc, uri);
                              ^~~
../../../net/stream.c:322:31: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    qemu_set_info_str(&s->nc, uri);
                              ^~~

There are also two other warnings:

../../../net/socket.c:182:35: warning: zero-length gnu_printf format string [-Wformat-zero-length]
  182 |         qemu_set_info_str(&s->nc, "");
      |                                   ^~
../../../net/stream.c:170:35: warning: zero-length gnu_printf format string [-Wformat-zero-length]
  170 |         qemu_set_info_str(&s->nc, "");

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221126152507.283271-7-sw@weilnetz.de>
2 years ago
..
can util/log: Remove qemu_log_flush 3 years ago
announce.c include: move C/util-related declarations to cutils.h 3 years ago
checksum.c net/checksum: Remove unused variable in net_checksum_add_iov 3 years ago
clients.h qapi: net: add stream and dgram netdevs 2 years ago
colo-compare.c net/colo: Fix a "double free" crash to clear the conn_list 2 years ago
colo-compare.h Add the function of colo_compare_cleanup 4 years ago
colo.c net/colo.c: Fix the pointer issue reported by Coverity. 2 years ago
colo.h net/colo.c: Fix the pointer issue reported by Coverity. 2 years ago
dgram.c net: dgram: add unix socket 2 years ago
dump.c rtc: Move RTC function prototypes to their own header 3 years ago
eth.c net/eth: Don't consider ESP to be an IPv6 option header 3 years ago
filter-buffer.c netfilter: Use class properties 4 years ago
filter-mirror.c net/filter: Optimize filter_send to coroutine 3 years ago
filter-replay.c hw: Do not include qemu/log.h if it is not necessary 4 years ago
filter-rewriter.c net/colo: Fix a "double free" crash to clear the conn_list 2 years ago
filter.c netfilter: Use class properties 4 years ago
hub.c qapi: net: add stream and dgram netdevs 2 years ago
hub.h net: Remove deprecated [hub_id name] tuple of 'hostfwd_add' / 'hostfwd_remove' 5 years ago
l2tpv3.c net: introduce qemu_set_info_str() function 2 years ago
meson.build qapi: net: add stream and dgram netdevs 2 years ago
net.c qapi: net: add stream and dgram netdevs 2 years ago
netmap.c Do not include sysemu/sysemu.h if it's not really necessary 4 years ago
queue.c net: introduce qemu_receive_packet() 4 years ago
slirp.c net: introduce qemu_set_info_str() function 2 years ago
socket.c Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues 2 years ago
stream.c Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues 2 years ago
tap-bsd.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 3 years ago
tap-linux.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 3 years ago
tap-linux.h net: Replace TAB indentations with spaces 2 years ago
tap-solaris.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 3 years ago
tap-stub.c net: Added SetSteeringEBPF method for NetClientState. 4 years ago
tap-win32.c net: introduce qemu_set_info_str() function 2 years ago
tap.c net: introduce qemu_set_info_str() function 2 years ago
tap_int.h net: Added SetSteeringEBPF method for NetClientState. 4 years ago
trace-events net/colo.c: Fix the pointer issue reported by Coverity. 2 years ago
trace.h trace: switch position of headers to what Meson requires 4 years ago
util.c net: Clean up includes 9 years ago
util.h Replace config-time define HOST_WORDS_BIGENDIAN 3 years ago
vde.c net: introduce qemu_set_info_str() function 2 years ago
vhost-user-stub.c vhost-net-user: add stubs for when no virtio-net device is present 6 years ago
vhost-user.c net: introduce qemu_set_info_str() function 2 years ago
vhost-vdpa-stub.c vhost-net-vdpa: add stubs for when no virtio-net device is present 2 years ago
vhost-vdpa.c vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices 2 years ago
vmnet-bridged.m net/vmnet: implement bridged mode (vmnet-bridged) 3 years ago
vmnet-common.m net/vmnet: implement shared mode (vmnet-shared) 3 years ago
vmnet-host.c net/vmnet: implement host mode (vmnet-host) 3 years ago
vmnet-shared.c net/vmnet: implement shared mode (vmnet-shared) 3 years ago
vmnet_int.h net/vmnet: implement shared mode (vmnet-shared) 3 years ago