nouveau/ws: fix building error in nouveau_ws_push_dump()

PRIxPTR macro solves the problem

Fixes the following build error:

../src/nouveau/winsys/nouveau_push.c:119:43: error: format specifies type 'unsigned long' but the argument has type 'int' [-Werror,-Wformat]
      printf("[0x%08lx] HDR %x subch %i", cur - push->orig_map, hdr, subchan);
                 ~~~~~                    ^~~~~~~~~~~~~~~~~~~~
                 %08x
1 error generated.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Mauro Rossi
2022-07-15 18:04:27 +02:00
committed by Marge Bot
parent 002516aeb8
commit 403ac39bbc
+2 -1
View File
@@ -1,6 +1,7 @@
#include "nouveau_push.h"
#include <errno.h>
#include <inttypes.h>
#include <nouveau_drm.h>
#include <sys/mman.h>
#include <xf86drm.h>
@@ -115,7 +116,7 @@ nouveau_ws_push_dump(struct nouveau_ws_push *push, struct nouveau_ws_context *ct
uint32_t value = 0;
bool is_immd = false;
printf("[0x%08lx] HDR %x subch %i", cur - push->orig_map, hdr, subchan);
printf("[0x%08" PRIxPTR "] HDR %x subch %i", cur - push->orig_map, hdr, subchan);
cur++;
switch (type) {