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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user