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/include/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
..
announce.h net/announce: Add optional ID 5 years ago
can_emu.h net/can: Add can_dlc2len and can_len2dlc for CAN FD. 4 years ago
can_host.h qom: fix objects with improper parent type 4 years ago
checksum.h net: checksum: Introduce fine control over checksum type 4 years ago
eth.h Replace config-time define HOST_WORDS_BIGENDIAN 3 years ago
filter.h Use OBJECT_DECLARE_TYPE when possible 4 years ago
net.h Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues 2 years ago
queue.h net: introduce qemu_receive_packet() 4 years ago
slirp.h net: Remove the deprecated -tftp, -bootp, -redir and -smb options 6 years ago
tap.h Include qemu-common.h exactly where needed 6 years ago
vhost-user.h Clean up ill-advised or unusual header guards 8 years ago
vhost-vdpa.h vhost-vdpa: remove the unused vhost_vdpa_get_acked_features() 3 years ago
vhost_net.h vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart() 2 years ago