From 32f2b5d245fcaadc540cbac9f4780cc199b1ae0d Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 10 May 2024 19:57:27 +0200 Subject: [PATCH] llvmpipe: wrap the push/pull in the ifdef as well Fixes: c7634c25e4fe78cf993d ("llvmpipe: Fix build error with clang-18") Part-of: --- src/gallium/drivers/llvmpipe/lp_screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 435ba44b009..293240580b8 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -598,13 +598,15 @@ 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 push #pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wformat-truncation" #endif /* __clang__ */ snprintf(uuid, PIPE_UUID_SIZE, "mesa" PACKAGE_VERSION); +#if defined(__clang__) #pragma GCC diagnostic pop +#endif /* __clang__ */ }