From 011fd3b1ce97b470439f32243bbc89c108afe872 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 15 Apr 2012 09:54:47 +0000 Subject: [PATCH] Eina: Fixed usage of gnu extension. (idx, ## __VA_ARGS__) is a gnu extension, fixed to be (__VA_ARGS__). Should be fine this way. Less descriptive maybe, because now people will may think it's ok to pass 0 arguments, but there's no avoiding this. SVN revision: 70194 --- legacy/eina/src/include/eina_safety_checks.h | 2 +- legacy/eina/src/include/eina_types.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/eina/src/include/eina_safety_checks.h b/legacy/eina/src/include/eina_safety_checks.h index a6d0106a4d..73ae1b295e 100644 --- a/legacy/eina/src/include/eina_safety_checks.h +++ b/legacy/eina/src/include/eina_safety_checks.h @@ -210,7 +210,7 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED; #ifdef EINA_ARG_NONNULL /* make EINA_ARG_NONNULL void so GCC does not optimize safety checks */ #undef EINA_ARG_NONNULL -#define EINA_ARG_NONNULL(idx, ...) +#define EINA_ARG_NONNULL(...) #endif #else /* no safety checks */ diff --git a/legacy/eina/src/include/eina_types.h b/legacy/eina/src/include/eina_types.h index 9f3aa6f7b1..d1e84dc67b 100644 --- a/legacy/eina/src/include/eina_types.h +++ b/legacy/eina/src/include/eina_types.h @@ -108,9 +108,9 @@ # endif # if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) -# define EINA_ARG_NONNULL(idx, ...) __attribute__ ((__nonnull__(idx, ## __VA_ARGS__))) +# define EINA_ARG_NONNULL(...) __attribute__ ((__nonnull__(__VA_ARGS__))) # else -# define EINA_ARG_NONNULL(idx, ...) +# define EINA_ARG_NONNULL(...) # endif # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) @@ -151,7 +151,7 @@ #elif defined(_WIN32) # define EINA_WARN_UNUSED_RESULT -# define EINA_ARG_NONNULL(idx, ...) +# define EINA_ARG_NONNULL(...) # if defined(_MSC_VER) && _MSC_VER >= 1300 # define EINA_DEPRECATED __declspec(deprecated) # else @@ -202,7 +202,7 @@ * @def EINA_ARG_NONNULL * Used to warn when the specified arguments of the function are @c NULL. */ -# define EINA_ARG_NONNULL(idx, ...) +# define EINA_ARG_NONNULL(...) /** * @def EINA_DEPRECATED