diff options
author | Stefan Fritsch <sf@apache.org> | 2012-11-18 19:31:39 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2012-11-18 19:31:39 +0000 |
commit | 53c102c372d65f6272c529c99a456f03f0a28407 (patch) | |
tree | db283eef2aa5b631cbffd66b9764db3697535824 /include/ap_config.h | |
parent | 6d5f73206d74dfec5fcf3ef3728b5999756704d9 (diff) | |
download | httpd-53c102c372d65f6272c529c99a456f03f0a28407.tar.gz |
add attribute nonnull to a few functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410963 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/ap_config.h')
-rw-r--r-- | include/ap_config.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/ap_config.h b/include/ap_config.h index 3bb667cdfd..41f0caf174 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -249,4 +249,17 @@ #define AP_FN_ATTR_ALLOC_SIZE2(x,y) #endif +#if ( defined(__GNUC__) && \ + (__GNUC__ >= 4 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 3))) \ + || __has_attribute(nonnull) +/* all pointer arguments */ +#define AP_FN_ATTR_NONNULL_ALL __attribute__((nonnull)) +/* listed arguments, use with double braces: AP_FN_ATTR_NONNULL((1,3,6)) */ +#define AP_FN_ATTR_NONNULL(x) __attribute__((nonnull x)) +#else +#define AP_FN_ATTR_NONNULL_ALL +#define AP_FN_ATTR_NONNULL(x) +#endif + + #endif /* AP_CONFIG_H */ |