From 543072cd5081b973b8d18005c196c82ea68efb92 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 30 May 2026 22:49:38 -0400 Subject: [PATCH] docs: Update documentation for SDL_stack_free. Reference Issue #15727. (cherry picked from commit 098a066f202c87014f783c2730610aa7ed913e50) --- include/SDL3/SDL_stdinc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h index 1f09176173..b6403bea71 100644 --- a/include/SDL3/SDL_stdinc.h +++ b/include/SDL3/SDL_stdinc.h @@ -1290,8 +1290,9 @@ extern "C" { /** * Free memory previously allocated with SDL_stack_alloc. * - * If SDL used alloca() to allocate this memory, this macro does nothing and - * the allocated memory will be automatically released when the function that + * If SDL used alloca() to allocate this memory, this macro does nothing (other + * than insert `((void)(data)` so the compiler sees an expression) and the + * allocated memory will be automatically released when the function that * called SDL_stack_alloc() returns. If SDL used SDL_malloc(), it will * SDL_free the memory immediately. * @@ -1303,7 +1304,7 @@ extern "C" { * * \sa SDL_stack_alloc */ -#define SDL_stack_free(data) +#define SDL_stack_free(data) ((void)(data)) #elif !defined(SDL_DISABLE_ALLOCA) #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count)) #define SDL_stack_free(data) ((void)(data))