mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-24 02:40:41 +01:00
common: xash3d_types: add returns nonnull attribute
This commit is contained in:
parent
d15949d2e8
commit
534adc9630
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user