From 37b9b9a85482f6ab85a8643d6dee969e9fc51d37 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 24 Jan 2024 17:18:16 +0100 Subject: [PATCH] modesetting: fix int size mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC repors: ../hw/xfree86/drivers/modesetting/drmmode_display.c:4135:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 4135 | "Gamma ramp set to %ld entries on CRTC %d\n", | ~~^ | | | long int | %lld 4136 | size, num); | ~~~~ | | | uint64_t {aka long long unsigned int} ../hw/xfree86/drivers/modesetting/drmmode_display.c:4139:57: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] 4139 | "Failed to allocate memory for %ld gamma ramp entries " | ~~^ | | | long int | %lld 4140 | "on CRTC %d.\n", 4141 | size, num); | ~~~~ | | | uint64_t {aka long long unsigned int} Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/drivers/modesetting/drmmode_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 1c1d79f30..5c8b47b53 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -4132,13 +4132,13 @@ drmmode_crtc_upgrade_lut(xf86CrtcPtr crtc, int num) crtc->gamma_blue = gamma + size * 2; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG, - "Gamma ramp set to %ld entries on CRTC %d\n", - size, num); + "Gamma ramp set to %lld entries on CRTC %d\n", + (long long)size, num); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to allocate memory for %ld gamma ramp entries " + "Failed to allocate memory for %lld gamma ramp entries " "on CRTC %d.\n", - size, num); + (long long)size, num); return FALSE; } }