xkb: fix int size mismatch

GCC reports:

../xkb/xkb.c: In function ‘_XkbSetMapCheckLength’:
../xkb/xkb.c:2464:54: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
 2464 |     ErrorF("[xkb] BOGUS LENGTH in SetMap: expected %ld got %ld\n",
      |                                                    ~~^
      |                                                      |
      |                                                      long int
      |                                                    %d
 2465 |            len, req_len);
      |            ~~~
      |            |
      |            size_t {aka unsigned int}
../xkb/xkb.c:2464:62: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
 2464 |     ErrorF("[xkb] BOGUS LENGTH in SetMap: expected %ld got %ld\n",
      |                                                            ~~^
      |                                                              |
      |                                                              long int
      |                                                            %d
 2465 |            len, req_len);
      |                 ~~~~~~~
      |                 |
      |                 size_t {aka 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 28669adef8
commit bc90c44e60

View File

@ -2460,8 +2460,7 @@ _XkbSetMapCheckLength(xkbSetMapReq *req)
if (len == req_len)
return Success;
bad:
ErrorF("[xkb] BOGUS LENGTH in SetMap: expected %ld got %ld\n",
len, req_len);
ErrorF("[xkb] BOGUS LENGTH in SetMap: expected %zd got %zd\n", len, req_len);
return BadLength;
}