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 <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29110>
This commit is contained in:
Rob Clark
2024-05-08 11:44:00 -07:00
committed by Marge Bot
parent 568807cf88
commit c7634c25e4

View File

@@ -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
}