1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r2242: some older versions of gcc don't properly handle the

PRINTF_ATTRIBUTE() format checking magic, so only enable it for gcc
versions >= 3.0
(This used to be commit 9c7100e3c7)
This commit is contained in:
Andrew Tridgell 2004-09-07 22:02:44 +00:00 committed by Gerald (Jerry) Carter
parent 8fa455d815
commit 3ddde3b74c

View File

@ -53,10 +53,11 @@
#define PRINTCAP_NAME "/etc/printcap"
#endif
#ifdef __GNUC__
#if (__GNUC__ >= 3)
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
* the parameter containing the format, and a2 the index of the first
* argument. **/
* argument. Note that some gcc 2.x versions don't handle this
* properly **/
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
#else
#define PRINTF_ATTRIBUTE(a1, a2)