xserver/randr
Alan Coopersmith c5ecfa5eea randr: handle -Wanalyzer-null-dereference in ProcRRGetScreenInfo()
Reported in #1817:
xwayland-24.1.6/redhat-linux-build/../randr/rrscreen.c:848:13:
 warning[-Wanalyzer-null-dereference]: dereference of NULL ‘size’

Move the use of the pointer inside the body of the if statement that
allocates the pointer so the static analyzer doesn't have to understand
the various conditions are effectively equivalent, despite the different
ways they are expressed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2165>
2026-04-04 16:10:16 +00:00
..
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00
randr.c randr: move private definitons from randrstr.h to randrstr_priv.h 2026-01-19 12:32:18 -08:00
randrstr.h randr: move private definitons from randrstr.h to randrstr_priv.h 2026-01-19 12:32:18 -08:00
randrstr_priv.h randr: move private definitons from randrstr.h to randrstr_priv.h 2026-01-19 12:32:18 -08:00
rrcrtc.c Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
rrdispatch.c prevent name clash on Windows w/ RT_* defines 2026-01-19 12:48:30 -08:00
rrinfo.c Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
rrlease.c prevent name clash on Windows w/ RT_* defines 2026-01-19 12:48:30 -08:00
rrmode.c randr: fix length checking with bigreq 2026-01-25 10:39:58 -08:00
rrmonitor.c randr: fix length checking with bigreq 2026-01-25 10:39:58 -08:00
rroutput.c randr: handle -Wanalyzer-null-dereference in ProcRRGetOutputInfo() 2026-04-04 16:10:16 +00:00
rrpointer.c randr: Fix logic in RRPointerToNearestCrtc 2014-07-30 14:40:17 -07:00
rrproperty.c randr: fix length checking with bigreq 2026-01-25 10:39:58 -08:00
rrprovider.c randr: fix unconditional byte-swap in ProcRRGetProviderInfo() 2026-01-25 10:40:01 -08:00
rrproviderproperty.c randr: handle -Wanalyzer-null-dereference in ProcRRListProviderProperties() 2026-04-04 16:10:16 +00:00
rrscreen.c randr: handle -Wanalyzer-null-dereference in ProcRRGetScreenInfo() 2026-04-04 16:10:16 +00:00
rrsdispatch.c randr: drop swapping request length fields 2026-01-25 10:39:59 -08:00
rrtransform.c randr: Silence -Wshift-negative-value warnings 2015-10-19 11:51:52 -04:00
rrtransform.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
rrxinerama.c randr: drop now obsolete swap procs 2026-01-25 10:39:59 -08:00