From c7634c25e4fe78cf993de65dd184d7155564eca2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 8 May 2024 11:44:00 -0700 Subject: [PATCH] llvmpipe: Fix build error with clang-18 We don't actually care about the truncation, so tell clang to stfu. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10973 Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/llvmpipe/lp_screen.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index e3c948425b4..435ba44b009 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -598,7 +598,13 @@ static void llvmpipe_get_device_uuid(struct pipe_screen *pscreen, char *uuid) { memset(uuid, 0, PIPE_UUID_SIZE); +#pragma GCC diagnostic push +#if defined(__clang__) +#pragma GCC diagnostic ignored "-Wunknown-warning-option" +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif /* __clang__ */ snprintf(uuid, PIPE_UUID_SIZE, "mesa" PACKAGE_VERSION); +#pragma GCC diagnostic pop }