SDL/src
David Gow 8f06a629aa render: Fix -Wmaybe-uninitialized warning in RenderDrawLinesWithRects{,F}
The RenderDrawLinesWithRects and RenderDrawLinesWithRectsF functions can
sometimes call QueueCmdFillRects() with the data pointed to by frects
uninitialised. This can occur if none of the lines can be replaced with
rects, in which case the frects array is empty, and nrects is 0.

gcc 10.3.0 will detect this possibility, and print a warning like:
/home/david/Development/SDL/src/render/SDL_render.c: In function 'RenderDrawLinesWithRectsF':
/home/david/Development/SDL/src/render/SDL_render.c:2725:15: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 2725 |     retval += QueueCmdFillRects(renderer, frects, nrects);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/david/Development/SDL/src/render/SDL_render.c:499:1: note: by argument 2 of type 'const SDL_FRect *' to 'QueueCmdFillRects' declared here
  499 | QueueCmdFillRects(SDL_Renderer *renderer, const SDL_FRect * rects, const int count)
      | ^~~~~~~~~~~~~~~~~

This is harmless, because when this is uninitialised, nrects is always
0, so QueueCmdFillRects() does nothing anyway. We therefore can work
around this by only calling QueueCmdFillRects() when nrects is nonzero.
Somewhat impressively, gcc recognises that this is now safe.
2021-07-30 10:53:49 -04:00
..
atomic spinlock: Favor gcc-style atomics over MSVC interfaces. 2021-07-27 13:45:33 -04:00
audio audiocvt: The to-5.1 converters now soften FL and FR channels more. 2021-07-29 17:55:59 -04:00
core WIN_SetErrorFromHRESULT: kill CR/LF that FormatMessage sticks at the end 2021-07-08 20:33:50 +03:00
cpuinfo Fix pointer provenance in SDL_SIMDRealloc 2021-07-29 14:42:15 -07:00
dynapi Added SDL_GameControllerGetSensorDataRate() to get the sensor update rate for a controller. 2021-07-29 06:43:39 -07:00
events Avoid warping the cursor to the center of the window when not in relative_warp_mode 2021-07-08 09:27:09 -07:00
file Add support for Vita file API in SDL_rwops 2021-03-08 09:07:12 -08:00
filesystem Windows: Fix SDL_GetBasePath() truncating paths 2021-06-12 23:07:46 -04:00
haptic Rename haptic methods to avoid confusion with joystick: 2021-06-10 16:41:09 -07:00
hidapi Implemented the timeout in hid_read_timeout() on Android 2021-07-08 18:44:50 -07:00
joystick Don't uninitialize COM because of what appears to be a bug in Microsoft WGI reference counting. 2021-07-29 14:25:13 -07:00
libm Updated copyright for 2021 2021-01-02 10:25:38 -08:00
loadso Updated copyright for 2021 2021-01-02 10:25:38 -08:00
locale consistently use TEXT() macro with LoadLibrary() and GetModuleHandle() 2021-01-04 01:23:50 +03:00
main SDL_windows_main: use HeapAlloc/HeapFree for command line arguments 2021-04-22 17:26:13 -07:00
misc Deprecate dolcesdk 2021-03-08 09:07:12 -08:00
power Initial rebase of xerpi's port 2021-03-08 09:07:12 -08:00
render render: Fix -Wmaybe-uninitialized warning in RenderDrawLinesWithRects{,F} 2021-07-30 10:53:49 -04:00
sensor Deprecate dolcesdk 2021-03-08 09:07:12 -08:00
stdlib Fix casts that should be using uintptr_t 2021-07-29 14:42:15 -07:00
test Added a window flash operation to be explicit about window flash behavior 2021-07-24 13:42:19 -07:00
thread Migrate to lightweight mutexes 2021-04-24 14:13:09 -07:00
timer Formatting 2021-03-08 09:07:12 -08:00
video wayland: Fix GetWindowWMInfo for <2.0.15 2021-07-30 00:16:52 -07:00
SDL.c linux: (de)initialize d-bus at init and quit. 2021-04-02 14:35:11 -04:00
SDL_assert.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_internal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_log.c Initial rebase of xerpi's port 2021-03-08 09:07:12 -08:00