sdk: add _X_ATTRIBUTE_NONNULL_ARGS() macro
Adding a macro for specifying nonnull attributes, for easier future transition to new C23 attributes or supporting strange compilers that don't understand this attribute. The purpose of using those attributes is aiding compiler warnings and potential optimizations. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
0d2213ec44
commit
802a581f51
|
@ -58,6 +58,15 @@ SOFTWARE.
|
||||||
|
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief macro for specifying non-null arguments
|
||||||
|
*
|
||||||
|
* part of public SDK / driver API
|
||||||
|
*/
|
||||||
|
#ifndef _X_ATTRIBUTE_NONNULL_ARG
|
||||||
|
#define _X_ATTRIBUTE_NONNULL_ARG(...) __attribute__((nonnull(__VA_ARGS__)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SCREEN_SAVER_ON 0
|
#define SCREEN_SAVER_ON 0
|
||||||
#define SCREEN_SAVER_OFF 1
|
#define SCREEN_SAVER_OFF 1
|
||||||
#define SCREEN_SAVER_FORCER 2
|
#define SCREEN_SAVER_FORCER 2
|
||||||
|
|
Loading…
Reference in New Issue