From b630a84447c3d627af0755ceba3e7e71aaceba6f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 13 May 2026 10:11:21 +0500 Subject: [PATCH] common: xash3d_types: add macro MAYBE_UNUSED --- common/xash3d_types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/xash3d_types.h b/common/xash3d_types.h index 3272e710..9d88f023 100644 --- a/common/xash3d_types.h +++ b/common/xash3d_types.h @@ -114,6 +114,7 @@ typedef int qboolean; #define FORMAT_CHECK( x ) __attribute__(( format( printf, x, x + 1 ))) #define ALLOC_CHECK( x ) __attribute__(( alloc_size( x ))) #define WARN_UNUSED_RESULT __attribute__(( warn_unused_result )) + #define MAYBE_UNUSED __attribute__(( unused )) #define RENAME_SYMBOL( x ) asm( x ) #if !defined( offsetof ) #define offsetof( s, m ) __builtin_offsetof( s, m ) @@ -198,6 +199,10 @@ typedef int qboolean; #define WARN_UNUSED_RESULT #endif // !defined( WARN_UNUSED_RESULT ) +#if !defined( MAYBE_UNUSED ) + #define MAYBE_UNUSED +#endif // !defined( MAYBE_UNUSED ) + #if !defined( RENAME_SYMBOL ) #define RENAME_SYMBOL( x ) #endif // !defined( RENAME_SYMBOL )