tools/xenstore: Consolidate PRINTF_ATTRIBUTE() in utils.h
authorJulien Grall <jgrall@amazon.com>
Fri, 5 Mar 2021 12:40:02 +0000 (12:40 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 11 Mar 2021 09:44:51 +0000 (09:44 +0000)
commit209b309e33ebbf8674a9d84fd73cce7f1e70e7eb
treece6ffbfa160fec0053f5b2133419705c626dfc65
parente4bdcc8aef6707027168ea29caed844a7da67b4d
tools/xenstore: Consolidate PRINTF_ATTRIBUTE() in utils.h

At the moment PRINTF_ATTRIBUTE() is defined in two places:
    - tdb.h: Defined as a NOP
    - talloc.h: Defined as a NOP for GCC older than 3.0 otherwise will
    add the attribute to check the printf format

Xen requires to build with minimum GCC 4.1 and we want to check the
printf format for all the printf-like functions.

Only implement PRINTF_ATTRIBUTE() once in utils.h and drop the
conditional check for GCC < 3.0.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/xenstore/talloc.h
tools/xenstore/tdb.h
tools/xenstore/utils.h