summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/stdio.h b/include/stdio.h
index dea839c5a..9336fe3cc 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -337,7 +337,8 @@ extern int printf (__const char *__restrict __format, ...);
libc_hidden_proto(printf)
/* Write formatted output to S. */
extern int sprintf (char *__restrict __s,
- __const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...)
+ __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
libc_hidden_proto(sprintf)
/* Write formatted output to S from argument list ARG.
@@ -354,7 +355,8 @@ libc_hidden_proto(vfprintf)
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
/* Write formatted output to S from argument list ARG. */
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
- __gnuc_va_list __arg) __THROW;
+ __gnuc_va_list __arg)
+ __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
__END_NAMESPACE_STD
#if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
@@ -410,16 +412,19 @@ __BEGIN_NAMESPACE_STD
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fscanf (FILE *__restrict __stream,
- __const char *__restrict __format, ...) __wur;
+ __const char *__restrict __format, ...)
+ __attribute__ ((__format__ (__scanf__, 2, 3))) __wur;
libc_hidden_proto(fscanf)
/* Read formatted input from stdin.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern int scanf (__const char *__restrict __format, ...) __wur;
+extern int scanf (__const char *__restrict __format, ...)
+ __attribute__ ((__format__ (__scanf__, 1, 2))) __wur;
/* Read formatted input from S. */
extern int sscanf (__const char *__restrict __s,
- __const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...)
+ __THROW __attribute__ ((__format__ (__scanf__, 2, 3)));
libc_hidden_proto(sscanf)
__END_NAMESPACE_STD