aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cpp-compile-test.cpp
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-08-05 00:35:40 +0200
committerCarlos Garnacho <carlosg@gnome.org>2022-08-05 01:26:10 +0200
commit73468bab7d12fd4d7b62d3b50a56e77acd977607 (patch)
tree38929b6ed419d94bc56bc69878a7bd0797bd659c /tests/cpp-compile-test.cpp
parentDocument which type are nullable, and wire format for null value (diff)
downloadwayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar.gz
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar.bz2
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar.lz
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar.xz
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.tar.zst
wayland-73468bab7d12fd4d7b62d3b50a56e77acd977607.zip
server: Extend display name string size
Typically this is a number between 0 and 32. Just that the compiler doesn't know that well. Make the string buffer a bit larger, so that it fits the longer integers. Fixes build warnings like: ../subprojects/wayland/src/wayland-server.c: In function ‘wl_display_add_socket_auto’: ../subprojects/wayland/src/wayland-server.c:1649:70: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 1649 | snprintf(display_name, sizeof display_name, "wayland-%d", displayno); | ^~ ../subprojects/wayland/src/wayland-server.c:1649:61: note: directive argument in the range [-2147483647, 32] 1649 | snprintf(display_name, sizeof display_name, "wayland-%d", displayno); | ^~~~~~~~~~~~ ../subprojects/wayland/src/wayland-server.c:1649:17: note: ‘snprintf’ output between 10 and 20 bytes into a destination of size 16 1649 | snprintf(display_name, sizeof display_name, "wayland-%d", displayno); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Seen in GTK CI. Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Diffstat (limited to 'tests/cpp-compile-test.cpp')
0 files changed, 0 insertions, 0 deletions