From 295faf67d8896c9c3694bcc8926369d233ee1b88 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 23 Sep 2011 16:54:59 +0800 Subject: [PATCH] stdio: Add __printflike for dprintf(3) and vdprintf(3) Noticed-by: "Xia Zuoling" --- include/stdio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stdio.h b/include/stdio.h index 36f7be218b..49635b5b7d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -298,7 +298,7 @@ char *tempnam(const char *, const char *); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); int renameat(int, const char *, int, const char *); -int vdprintf(int, const char * __restrict, __va_list); +int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); FILE *fmemopen(void *__restrict, size_t, const char *__restrict); FILE *open_memstream(char **, size_t *); @@ -336,7 +336,7 @@ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); #endif #ifdef _WITH_DPRINTF -int dprintf(int, const char * __restrict, ...); +int dprintf(int, const char * __restrict, ...) __printflike(2, 3); #endif #endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ -- 2.41.0