Make gets() deprecated.

gets is already deprecated in glibc. Others with __warnattr are not deprecated.

Change-Id: I80a276d2b5964630218be47f1c94b146c0d31151
This commit is contained in:
Yabin Cui 2015-02-18 12:20:32 -08:00
parent 0e61c2c0ea
commit 913fcb274f

View File

@ -266,7 +266,7 @@ int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0);
#ifndef __AUDIT__
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
char* gets(char*) __warnattr("gets is very unsafe; consider using fgets");
char* gets(char*) __attribute__((deprecated("gets is very unsafe; consider using fgets")));
#endif
int sprintf(char* __restrict, const char* __restrict, ...)
__printflike(2, 3) __warnattr("sprintf is often misused; please use snprintf");