modesetting: fix int size mismatch

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 <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1257>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-01-24 17:18:16 +01:00 committed by Marge Bot
parent bc90c44e60
commit 37b9b9a854

View File

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