diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2014-06-11 15:36:58 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2014-06-12 13:19:51 -0700 |
commit | 0cddcc67ccee57b4f06d0b1c4fef70ef9d16f0a3 (patch) | |
tree | 396f9a604d81c1dd56409e27f36ac0a3d2d80d2a /include/android | |
parent | a9aa0f2c42e2291496f39ca60775ff95648eba31 (diff) | |
download | core-0cddcc67ccee57b4f06d0b1c4fef70ef9d16f0a3.tar.gz core-0cddcc67ccee57b4f06d0b1c4fef70ef9d16f0a3.tar.bz2 core-0cddcc67ccee57b4f06d0b1c4fef70ef9d16f0a3.zip |
log: Fix warning with __USE_MINGW_ANSI_STDIO
I haven't seen this warning in any AOSP code, but some of our code is
using this header differently than the rest of the build system, and
hits this warning-turned-error:
error: "__USE_MINGW_ANSI_STDIO" is not defined [-Werror=undef]
Change-Id: I3c5a91f107af8bf6078e06f2ce326c5466349b79
Diffstat (limited to 'include/android')
-rw-r--r-- | include/android/log.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/android/log.h b/include/android/log.h index ad36bd223..1c171b7bf 100644 --- a/include/android/log.h +++ b/include/android/log.h @@ -98,11 +98,15 @@ int __android_log_write(int prio, const char *tag, const char *text); */ int __android_log_print(int prio, const char *tag, const char *fmt, ...) #if defined(__GNUC__) +#ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO __attribute__ ((format(gnu_printf, 3, 4))) #else __attribute__ ((format(printf, 3, 4))) #endif +#else + __attribute__ ((format(printf, 3, 4))) +#endif #endif ; @@ -121,11 +125,15 @@ void __android_log_assert(const char *cond, const char *tag, const char *fmt, ...) #if defined(__GNUC__) __attribute__ ((noreturn)) +#ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO __attribute__ ((format(gnu_printf, 3, 4))) #else __attribute__ ((format(printf, 3, 4))) #endif +#else + __attribute__ ((format(printf, 3, 4))) +#endif #endif ; |