diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2014-02-21 11:45:27 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-02-21 16:30:21 +0100 |
commit | 82ca8f9d41238b3e13b45a1c04489cf608842b9c (patch) | |
tree | da94b80e893adab04db3a1d78b6816814f92fe55 /include/cmocka.h | |
parent | a1e707b30ad819b15445d785819516ad58da4aa2 (diff) | |
download | cmocka-82ca8f9d41238b3e13b45a1c04489cf608842b9c.tar.gz cmocka-82ca8f9d41238b3e13b45a1c04489cf608842b9c.tar.bz2 cmocka-82ca8f9d41238b3e13b45a1c04489cf608842b9c.zip |
Use prefix for commonly used macro PRINTF_ATTRIBUTE
It may cause warning:
/usr/include/cmocka.h:50:0: warning: "PRINTF_ATTRIBUTE" redefined
[enabled by default]
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/cmocka.h')
-rw-r--r-- | include/cmocka.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/cmocka.h b/include/cmocka.h index 0047df9..4d0ecf9 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -47,9 +47,10 @@ int __stdcall IsDebuggerPresent(); /* GCC have printf type attribute check. */ #ifdef __GNUC__ -#define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) +#define CMOCKA_PRINTF_ATTRIBUTE(a,b) \ + __attribute__ ((__format__ (__printf__, a, b))) #else -#define PRINTF_ATTRIBUTE(a,b) +#define CMOCKA_PRINTF_ATTRIBUTE(a,b) #endif /* __GNUC__ */ /** @@ -1754,10 +1755,10 @@ int _run_test( int _run_tests(const UnitTest * const tests, const size_t number_of_tests); /* Standard output and error print methods. */ -void print_message(const char* const format, ...) PRINTF_ATTRIBUTE(1, 2); -void print_error(const char* const format, ...) PRINTF_ATTRIBUTE(1, 2); -void vprint_message(const char* const format, va_list args) PRINTF_ATTRIBUTE(1, 0); -void vprint_error(const char* const format, va_list args) PRINTF_ATTRIBUTE(1, 0); +void print_message(const char* const format, ...) CMOCKA_PRINTF_ATTRIBUTE(1, 2); +void print_error(const char* const format, ...) CMOCKA_PRINTF_ATTRIBUTE(1, 2); +void vprint_message(const char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0); +void vprint_error(const char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0); /** @} */ |