xserver/hw
Enrico Weigelt, metux IT consult 57254ca23c xnest: Display: fix xallocarray() compiler warning
Compiler warning:

[7/29] Compiling C object hw/xnest/Xnest.p/Display.c.o
In file included from ../include/misc.h:119,
                 from ../include/screenint.h:50,
                 from ../hw/xnest/Display.c:24:
../hw/xnest/Display.c: In function ‘xnestOpenDisplay’:
../include/os.h:81:32: warning: argument 2 range [2147483648, 4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
   81 | #define xallocarray(num, size) reallocarray(NULL, (num), (size))
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../hw/xnest/Display.c:124:29: note: in expansion of macro ‘xallocarray’
  124 |     xnestDefaultColormaps = xallocarray(xnestNumDefaultColormaps,
      |                             ^~~~~~~~~~~
In file included from ../include/os.h:54:
/usr/include/stdlib.h:582:14: note: in a call to allocation function ‘reallocarray’ declared here
  582 | extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
      |              ^~~~~~~~~~~~

Since we really don't need more than 2^16 colormaps, using uint16_t here
to silence this warning.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1392>
2024-04-15 18:52:13 +00:00
..
kdrive dix: unexport AddScreen() and AddGPUScreen() 2024-03-03 23:24:28 +00:00
vfb dix: unexport AddScreen() and AddGPUScreen() 2024-03-03 23:24:28 +00:00
xfree86 xfree86: vgahw: drop obsolete _NEED_SYSI86 2024-04-13 19:43:59 +00:00
xnest xnest: Display: fix xallocarray() compiler warning 2024-04-15 18:52:13 +00:00
xquartz Xquartz: ProcAppleDRICreatePixmap needs to use unswapped length to send reply 2024-04-02 19:19:40 -07:00
xwayland xwayland: Walk the regions' boxes 2024-04-12 07:38:26 +00:00
xwin xwin: consolidate debugging symbols 2024-03-19 02:05:35 +00:00
meson.build Drop DMX DDX 2021-09-07 09:34:31 +00:00