SDL/src
David Gow f6fdbc1e37 video: x11: Fix an invalid SDL_LogError() call
This fixes a compile warning — and possible invalid memory read —
introduced in 9c03d255 ("Add back X11 legacy WM_NAME encodings"), which
was part of PR #5029, fixing Bug #4924.

The issue is with one of the added warnings in X11_GetWindowTitle().
Basically, the "title" variable passed to SDL_LogError() hasn't been
initialised yet: we could pass propdata in directly, but it's better to
move the SDL_LogError() call until after title is set, IMHO.

This fixes the following warning from gcc (SUSE Linux) 11.2.1:
In file included from /home/david/Development/SDL/src/video/x11/../../SDL_internal.h:45,
                 from /home/david/Development/SDL/src/video/x11/SDL_x11window.c:21:
/home/david/Development/SDL/src/video/x11/SDL_x11window.c: In function 'X11_GetWindowTitle':
/home/david/Development/SDL/src/video/x11/../../dynapi/SDL_dynapi_overrides.h:33:22: warning: '%s' directive argument is null [-Wformat-overflow=]
   33 | #define SDL_LogDebug SDL_LogDebug_REAL
/home/david/Development/SDL/src/video/x11/SDL_x11window.c:720:13: note: in expansion of macro 'SDL_LogDebug'
  720 |             SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Failed to convert WM_NAME title expecting UTF8! Title: %s", title);
      |             ^~~~~~~~~~~~
2021-11-29 07:13:25 -08:00
..
atomic minor cleanup for watcom _inline keyword. 2021-11-25 17:00:24 +03:00
audio pulseaudio: wait until at least 1/8th (!) of the mixbuffer is available. 2021-11-25 22:32:40 -05:00
core null-terminate the message buffer if FormatMessage() fails 2021-11-28 21:10:46 -08:00
cpuinfo cpuinfo: remove malloc from comments 2021-11-22 08:38:46 -08:00
dynapi Added SDL_PremultiplyAlpha() to premultiply alpha on a block of SDL_PIXELFORMAT_ARGB8888 pixels 2021-11-21 12:18:10 -08:00
events Remove 'malloc' from comment 2021-11-22 08:38:46 -08:00
file Add support for Vita file API in SDL_rwops 2021-03-08 09:07:12 -08:00
filesystem Use SDL_free 2021-11-22 08:38:46 -08:00
haptic haptic: Fix SDL_MouseIsHaptic() always returning SDL_TRUE on Android 2021-11-27 19:18:41 +03:00
hidapi hidapi: mark libusb function pointers with LIBUSB_CALL. 2021-11-27 11:02:04 -08:00
joystick Fixed warnings with Windows SDK 10.0.19041 2021-11-27 20:18:29 -08: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 use SDL's functions version inplace of libc version 2021-11-22 08:38:46 -08:00
main Updated version to 2.0.18 for release 2021-11-26 08:12:45 -08:00
misc Fix warnings: static, include, un-initialized vairables 2021-11-23 10:33:12 +01:00
power use SDL's functions version inplace of libc version 2021-11-22 08:38:46 -08:00
render SDL_render_gl.c: GL_RunCommandQueue: always set viewport_dirty on macOS 2021-11-27 07:12:34 -05:00
sensor Don't fail the sensor init if we couldn't create a sensor manager (i.e. we're running on Wine) 2021-11-28 21:14:02 -08:00
stdlib Add and use SDL_FALLTHROUGH for fallthroughs 2021-11-12 07:26:14 +03:00
test Fixed potentially truncated entry in stack trace 2021-11-26 17:27:07 -08:00
thread VITA, PSP: use SDL_malloc 2021-11-22 08:38:46 -08:00
timer Fix warning: declaration shadows a local variable 2021-11-09 13:33:24 +01:00
video video: x11: Fix an invalid SDL_LogError() call 2021-11-29 07:13:25 -08:00
SDL.c minor tidy-up for ifdefs & co. 2021-11-20 21:51:10 +03: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 Remove malloc from comment 2021-11-22 08:38:46 -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 Check for O_CLOEXEC definition in fcntl.h at configuration time, 2021-11-27 19:23:10 +03:00
SDL_log.c log: Fixed compiler warnings on 64-bit Visual Studio. 2021-08-04 02:34:09 -04:00