[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-4.15 2/2] tools/xenstore: Check the format printf for xprintf() and barf{,_perror}()
On 05.03.2021 14:01, Jürgen Groß wrote: > On 05.03.21 13:40, Julien Grall wrote: >> From: Julien Grall <jgrall@xxxxxxxxxx> >> --- a/tools/xenstore/utils.h >> +++ b/tools/xenstore/utils.h >> @@ -29,10 +29,12 @@ const char *dump_state_align(FILE *fp); >> >> #define PRINTF_ATTRIBUTE(a1, a2) __attribute__((format (printf, a1, a2))) >> >> -void barf(const char *fmt, ...) __attribute__((noreturn)); >> -void barf_perror(const char *fmt, ...) __attribute__((noreturn)); >> +#define __noreturn __attribute__((noreturn)) >> >> -extern void (*xprintf)(const char *fmt, ...); >> +void barf(const char *fmt, ...) __noreturn PRINTF_ATTRIBUTE(1, 2); >> +void barf_perror(const char *fmt, ...) __noreturn PRINTF_ATTRIBUTE(1, 2); >> + >> +extern void (*xprintf)(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); > > ... the extern here would be dropped. But this isn't a function declaration, but that of a data object. With the extern dropped, a common symbol will appear in every CU. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |