From 30783de3efdf5afceb3dcf6f4336af3cb23b4ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 25 Feb 2025 16:29:34 +0100 Subject: [PATCH] Force C17 standard in qrexec-lib/validator-test.c GCC 17 defaults to -std=gnu23, which changes type of u8 string constants. This breaks the validator, as qubes_pure_string_safe_for_display expects 'const char *' not 'const unsigned char *'. The specific error message is: validator-test.c:286:48: error: pointer targets in passing argument 1 of ...qubes_pure_string_safe_for_display... differ in signedness [-Werror=pointer-sign] 286 | assert(!qubes_pure_string_safe_for_display(u8"\U0001f3f3", 0)); | ^~~~~~~~~~~~~~ | | | unsigned char * In file included from validator-test.c:6: pure.h:199:48: note: expected ...const char *... but argument is of type ...unsigned char *... 199 | qubes_pure_string_safe_for_display(const char *untrusted_str, | ~~~~~~~~~~~~^~~~~~~~~~~~~ validator-test.c:286:48: error: pointer targets in passing argument 1 of ...qubes_pure_string_safe_for_display... differ in signedness [-Werror=pointer-sign] 286 | assert(!qubes_pure_string_safe_for_display(u8"\U0001f3f3", 0)); | ^~~~~~~~~~~~~~ | | | unsigned char * pure.h:199:48: note: expected ...const char *... but argument is of type ...unsigned char *... 199 | qubes_pure_string_safe_for_display(const char *untrusted_str, | ~~~~~~~~~~~~^~~~~~~~~~~~~ QubesOS/qubes-issues#9807 --- qrexec-lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrexec-lib/Makefile b/qrexec-lib/Makefile index 22eb2def..63d4e386 100644 --- a/qrexec-lib/Makefile +++ b/qrexec-lib/Makefile @@ -18,7 +18,7 @@ $(pure_objs): CFLAGS += -fvisibility=hidden -DQUBES_PURE_IMPLEMENTATION ifeq ($(CHECK_UNREACHABLE),1) $(pure_objs): CFLAGS += -DCHECK_UNREACHABLE endif -validator-test: CFLAGS += -UNDEBUG +validator-test: CFLAGS += -UNDEBUG -std=gnu17 check: validator-test LD_LIBRARY_PATH=. ./validator-test