History

Make non-null return attributes meaningful with gcc 4.9 and up

Mans Rullgard committed 11 years ago

Commit 42d30cf1 parent 61b964b1 file · +13 −0Browse files

Unified · Split

src/sox.h+13−0
@@ -32,6 +32,19 @@ extern "C" { · 31 unmodified lines
32#pragma GCC system_header32#pragma GCC system_header
33#endif33#endif
34 34
35#if defined __GNUC__
36#define LSX_GCC(maj, min) \
37 ((__GNUC__ > (maj)) || (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min)))
38#else
39#define LSX_GCC(maj, min) 0
40#endif
41
42#if LSX_GCC(4,9)
43#define _Ret_ __attribute__ ((returns_nonnull))
44#define _Ret_valid_ _Ret_
45#define _Ret_z_ _Ret_
46#endif
47
35/*****************************************************************************48/*****************************************************************************
36API decoration macros:49API decoration macros:
37Mostly for documentation purposes. For some compilers, decorations also affect50Mostly for documentation purposes. For some compilers, decorations also affect

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t