xserver/hw/xnest
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
..
man Replace "the the" with a single "the" in docs & comments 2022-03-31 13:27:57 -07:00
.gitignore Xnest: build Xnest man pages using XORG_MANPAGE_SECTIONS 2011-01-18 15:10:17 -08:00
Args.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
Args.h Fix typo in header guard. 2013-07-17 18:11:41 -07:00
Color.c Convert hw/xnest & hw/vfb to new *allocarray functions 2015-04-21 16:58:08 -07:00
Color.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Cursor.c xnest: use own dev-privates key for per-screen cursor 2024-03-12 15:24:35 +00:00
Display.c xnest: Display: fix xallocarray() compiler warning 2024-04-15 18:52:13 +00:00
Display.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Drawable.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Events.c Drop valuator mask argument from GetKeyboardEvents 2015-03-13 12:31:21 +10:00
Events.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Font.c dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
GC.c Convert hw/xnest & hw/vfb to new *allocarray functions 2015-04-21 16:58:08 -07:00
GCOps.c hw/xnest: Eliminate shadowed names 2014-01-22 19:56:32 -08:00
GCOps.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
Handlers.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
Handlers.h Remove fd_set from Block/Wakeup handler API 2016-07-18 15:27:51 -04:00
Init.c dix: unexport AddScreen() and AddGPUScreen() 2024-03-03 23:24:28 +00:00
Init.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Keyboard.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
Keyboard.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
Pixmap.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
Pointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Pointer.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Screen.c xnest/mi: remove redundant call of miScreenDevPrivateInit() 2024-04-14 17:20:09 +00:00
Screen.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
Visual.c dix: Remove #includes of mibstore.h 2012-09-23 10:31:27 -07:00
Visual.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Window.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
XNCursor.h xnest: use own dev-privates key for per-screen cursor 2024-03-12 15:24:35 +00:00
XNFont.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
XNGC.h dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
XNPixmap.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
XNWindow.h dix: Drop the third argument from WindowExposuresProcPtr 2014-10-09 11:14:44 +02:00
Xnest.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
icon R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
meson.build mi: List extensions in usage message 2021-01-29 12:52:09 +00:00
screensaver R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
xnest-config.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00