2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-23 18:30:50 +01:00

common: xash3d_types: add returns nonnull attribute

This commit is contained in:
Alibek Omarov 2024-11-07 14:25:03 +03:00
parent d15949d2e8
commit 534adc9630

View File

@ -73,7 +73,7 @@ typedef uint64_t longtime_t;
#if defined( __GNUC__ )
#if defined( __i386__ )
#define EXPORT __attribute__(( visibility( "default" ), force_align_arg_pointer ))
#define GAME_EXPORT __attribute(( force_align_arg_pointer ))
#define GAME_EXPORT __attribute__(( force_align_arg_pointer ))
#else
#define EXPORT __attribute__(( visibility ( "default" )))
#define GAME_EXPORT
@ -91,6 +91,12 @@ typedef uint64_t longtime_t;
#endif
#define NORETURN __attribute__(( noreturn ))
#define NONNULL __attribute__(( nonnull ))
#define RETURNS_NONNULL __attribute__(( returns_nonnull ))
#if __clang__
#define PFN_RETURNS_NONNULL // clang has bugged returns_nonnull for functions pointers, it's ignored and generates a warning about objective-c? O_o
#else
#define PFN_RETURNS_NONNULL RETURNS_NONNULL
#endif
#define FORMAT_CHECK( x ) __attribute__(( format( printf, x, x + 1 )))
#define ALLOC_CHECK( x ) __attribute__(( alloc_size( x )))
#define NO_ASAN __attribute__(( no_sanitize( "address" )))
@ -107,6 +113,8 @@ typedef uint64_t longtime_t;
#define GAME_EXPORT
#define NORETURN
#define NONNULL
#define RETURNS_NONNULL
#define PFN_RETURNS_NONNULL
#define FORMAT_CHECK( x )
#define ALLOC_CHECK( x )
#define RENAME_SYMBOL( x )