diff options
author | Yabin Cui <yabinc@google.com> | 2015-02-17 23:54:40 +0000 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-02-17 23:54:40 +0000 |
commit | 784de4e50a1161d78757402c149d85368bd49c29 (patch) | |
tree | b845b7e6adc69d65e8b96e31fd25c1cf98d56493 | |
parent | 4645c4f62df49d1ece5aabb7c9fa44ca34d30272 (diff) | |
download | android_bionic-784de4e50a1161d78757402c149d85368bd49c29.tar.gz android_bionic-784de4e50a1161d78757402c149d85368bd49c29.tar.bz2 android_bionic-784de4e50a1161d78757402c149d85368bd49c29.zip |
Revert "Move use of __warnattr to __deprecated."
This reverts commit 4645c4f62df49d1ece5aabb7c9fa44ca34d30272.
Change-Id: I6c1062d54a4e2c4f41ce7a403e4e7840e6339146
-rw-r--r-- | libc/include/stdio.h | 10 | ||||
-rw-r--r-- | libc/include/stdlib.h | 2 | ||||
-rw-r--r-- | libc/include/sys/cdefs.h | 8 |
3 files changed, 8 insertions, 12 deletions
diff --git a/libc/include/stdio.h b/libc/include/stdio.h index f3bfae0d8..b04aa24c2 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -266,16 +266,16 @@ int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0); #ifndef __AUDIT__ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L -char* gets(char*) __deprecated("gets is very unsafe; consider using fgets"); +char* gets(char*) __warnattr("gets is very unsafe; consider using fgets"); #endif int sprintf(char* __restrict, const char* __restrict, ...) - __printflike(2, 3) __deprecated("sprintf is often misused; please use snprintf"); -char* tmpnam(char*) __deprecated("tmpnam possibly used unsafely; consider using mkstemp"); + __printflike(2, 3) __warnattr("sprintf is often misused; please use snprintf"); +char* tmpnam(char*) __warnattr("tmpnam possibly used unsafely; consider using mkstemp"); int vsprintf(char* __restrict, const char* __restrict, __va_list) - __printflike(2, 0) __deprecated("vsprintf is often misused; please use vsnprintf"); + __printflike(2, 0) __warnattr("vsprintf is often misused; please use vsnprintf"); #if __XPG_VISIBLE char* tempnam(const char*, const char*) - __deprecated("tempnam possibly used unsafely; consider using mkstemp"); + __warnattr("tempnam possibly used unsafely; consider using mkstemp"); #endif #endif diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index 7f1710d8b..cbd7aeb98 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -58,7 +58,7 @@ extern int unsetenv(const char*); extern int clearenv(void); extern char* mkdtemp(char*); -extern char* mktemp(char*) __deprecated("mktemp possibly used unsafely; consider using mkstemp"); +extern char* mktemp(char*) __warnattr("mktemp possibly used unsafely; consider using mkstemp"); extern int mkostemp64(char*, int); extern int mkostemp(char*, int); diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 17da393b0..1d33895e9 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -334,16 +334,12 @@ #define __wur #endif -#if __GNUC_PREREQ(3, 2) -#define __deprecated(msg) __attribute__ ((deprecated(msg))) -#else -#define __deprecated(msg) -#endif - #if __GNUC_PREREQ(4, 3) #define __errorattr(msg) __attribute__((__error__(msg))) +#define __warnattr(msg) __attribute__((__warning__(msg))) #else #define __errorattr(msg) +#define __warnattr(msg) #endif #define __errordecl(name, msg) extern void name(void) __errorattr(msg) |