Use __printf0like for warning() and fatal() since the fmt string
may be NULL.
This commit is contained in:
@@ -180,11 +180,11 @@ extern sigjmp_buf fatal_jmp;
|
|||||||
int fatal_callback_register(void (*func)(void));
|
int fatal_callback_register(void (*func)(void));
|
||||||
void fatal_disable_setjmp(void);
|
void fatal_disable_setjmp(void);
|
||||||
void fatal_enable_setjmp(void);
|
void fatal_enable_setjmp(void);
|
||||||
void fatal2(const char *, ...) __printflike(1, 2) __attribute__((__noreturn__));
|
void fatal2(const char *, ...) __printf0like(1, 2) __attribute__((__noreturn__));
|
||||||
void fatalx2(const char *, ...) __printflike(1, 2) __attribute__((__noreturn__));
|
void fatalx2(const char *, ...) __printflike(1, 2) __attribute__((__noreturn__));
|
||||||
void vfatal2(const char *, va_list ap) __attribute__((__noreturn__));
|
void vfatal2(const char *, va_list ap) __attribute__((__noreturn__));
|
||||||
void vfatalx2(const char *, va_list ap) __attribute__((__noreturn__));
|
void vfatalx2(const char *, va_list ap) __attribute__((__noreturn__));
|
||||||
void warning2(const char *, ...) __printflike(1, 2);
|
void warning2(const char *, ...) __printf0like(1, 2);
|
||||||
void warningx2(const char *, ...) __printflike(1, 2);
|
void warningx2(const char *, ...) __printflike(1, 2);
|
||||||
void vwarning2(const char *, va_list ap);
|
void vwarning2(const char *, va_list ap);
|
||||||
void vwarningx2(const char *, va_list ap);
|
void vwarningx2(const char *, va_list ap);
|
||||||
|
@@ -51,6 +51,9 @@
|
|||||||
# define __printflike(f, v)
|
# define __printflike(f, v)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef __printf0like
|
||||||
|
# define __printf0like __printflike
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Hint to compiler that returned pointer is unique (malloc but not realloc). */
|
/* Hint to compiler that returned pointer is unique (malloc but not realloc). */
|
||||||
#ifndef __malloc_like
|
#ifndef __malloc_like
|
||||||
|
Reference in New Issue
Block a user