From 080b1dfbdb7db0b3db3bf2f750cb645cf3397b74 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 5 Aug 2023 19:23:30 -0700
Subject: [PATCH] Revert "Improved fallback for SDL_COMPILE_TIME_ASSERT()
(thanks @icculus!)"
This reverts commit 9d453daa2389e7bde7e13809309af7a213bcb333.
Oops, it totally doesn't work:
error: unused variable 'SDL_compile_time_assert_SDL_copyp' [-Werror=unused-variable]
---
include/SDL3/SDL_stdinc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index 366f05336879..3643bb60f0c9 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -335,8 +335,9 @@ typedef uint64_t Uint64;
#endif /* !SDL_COMPILE_TIME_ASSERT */
#ifndef SDL_COMPILE_TIME_ASSERT
+/* universal, but may trigger -Wunused-local-typedefs */
#define SDL_COMPILE_TIME_ASSERT(name, x) \
- extern int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
+ typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
#endif
/** \cond */