SDL/src/stdlib
Ozkan Sezer 2205626816 SDL_iconv_string: simplify recomputation of outbuf and outbytesleft
Noticed this in SDL-1.2 where gcc-13 emits a -Wuse-after-free warning.
No such warning in SDL2 and SDL3, because unlike SDL1.2, SDL_realloc()
is not a macro expanding to libc realloc(). It warns, of course, if
SDL_realloc() is replaced with plain realloc():

src/stdlib/SDL_iconv.c: In function 'SDL_iconv_string_REAL':
src/stdlib/SDL_iconv.c:824:39: warning: pointer 'oldstring' may be used after 'realloc' [-Wuse-after-free]
  824 |             outbuf = string + (outbuf - oldstring);
      |                               ~~~~~~~~^~~~~~~~~~~~
src/stdlib/SDL_iconv.c:818:30: note: call to 'realloc' here
  818 |             string = (char *)realloc(string, stringsize + sizeof(Uint32));
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-05-10 18:50:32 +03:00
..
SDL_casefolding.h stdlib: Improve Unicode support and consistency in string comparison functions. 2024-03-29 15:01:40 -04:00
SDL_crc16.c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
SDL_crc32.c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
SDL_getenv.c Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
SDL_iconv.c SDL_iconv_string: simplify recomputation of outbuf and outbytesleft 2024-05-10 18:50:32 +03:00
SDL_malloc.c Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00
SDL_memcpy.c Fix warnings when building with -DSDL_LIBC=OFF on Linux 2024-03-18 21:29:08 +01:00
SDL_memmove.c Fix warnings when building with -DSDL_LIBC=OFF on Linux 2024-03-18 21:29:08 +01:00
SDL_memset.c Fix warnings when building with -DSDL_LIBC=OFF on Linux 2024-03-18 21:29:08 +01:00
SDL_mslibc.c Allow optimizing memcpy and memset where possible 2024-01-21 06:55:29 -08:00
SDL_mslibc_x64.masm Rename SDL_mslibc_x64.asm -> SDL_mslibc_x64.masm 2024-01-04 17:46:07 +01:00
SDL_qsort.c stdlib: qsort and bsearch changes. 2024-03-01 08:28:12 -05:00
SDL_stdlib.c stdlib: Improve Unicode support and consistency in string comparison functions. 2024-03-29 15:01:40 -04:00
SDL_string.c stdlib: Export some Unicode functions to other SDL internals. 2024-04-04 09:40:13 -04:00
SDL_strtokr.c Updated copyright for 2024 2024-01-01 13:15:26 -08:00
SDL_sysstdlib.h stdlib: Export some Unicode functions to other SDL internals. 2024-04-04 09:40:13 -04:00
SDL_vacopy.h Define SDL_PLATFORM_* macros instead of underscored ones (#8875) 2024-01-24 01:40:51 +00:00