فهرست منبع

stdinc: make SDL_stack_free evaluate to `((void)(data))` when alloca is usable.

Fixes #15727.
Ryan C. Gordon 21 ساعت پیش
والد
کامیت
67e6f5b7ee
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      include/SDL3/SDL_stdinc.h

+ 1 - 1
include/SDL3/SDL_stdinc.h

@@ -1318,7 +1318,7 @@ extern "C" {
 #define SDL_stack_free(data)
 #elif !defined(SDL_DISABLE_ALLOCA)
 #define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*(count))
-#define SDL_stack_free(data)
+#define SDL_stack_free(data)            ((void)(data))
 #else
 #define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*(count))
 #define SDL_stack_free(data)            SDL_free(data)