Loading adb/sysdeps.h +1 −9 Original line number Diff line number Diff line Loading @@ -41,16 +41,8 @@ // Some printf-like functions are implemented in terms of // android::base::StringAppendV, so they should use the same attribute for // compile-time format string checking. On Windows, if the mingw version of // vsnprintf is used in StringAppendV, use `gnu_printf' which allows z in %zd // and PRIu64 (and related) to be recognized by the compile-time checking. // compile-time format string checking. #define ADB_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef ADB_FORMAT_ARCHETYPE #define ADB_FORMAT_ARCHETYPE gnu_printf #endif #endif #ifdef _WIN32 Loading base/include/android-base/stringprintf.h +1 −10 Original line number Diff line number Diff line Loading @@ -24,17 +24,8 @@ namespace android { namespace base { // These printf-like functions are implemented in terms of vsnprintf, so they // use the same attribute for compile-time format string checking. On Windows, // if the mingw version of vsnprintf is used, use `gnu_printf' which allows z // in %zd and PRIu64 (and related) to be recognized by the compile-time // checking. // use the same attribute for compile-time format string checking. #define ANDROID_BASE_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef ANDROID_BASE_FORMAT_ARCHETYPE #define ANDROID_BASE_FORMAT_ARCHETYPE gnu_printf #endif #endif // Returns a string corresponding to printf-like formatting of the arguments. std::string StringPrintf(const char* fmt, ...) Loading fastboot/fastboot.h +1 −10 Original line number Diff line number Diff line Loading @@ -78,17 +78,8 @@ char* xstrdup(const char*); void set_verbose(); // These printf-like functions are implemented in terms of vsnprintf, so they // use the same attribute for compile-time format string checking. On Windows, // if the mingw version of vsnprintf is used, use `gnu_printf' which allows z // in %zd and PRIu64 (and related) to be recognized by the compile-time // checking. // use the same attribute for compile-time format string checking. #define FASTBOOT_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef FASTBOOT_FORMAT_ARCHETYPE #define FASTBOOT_FORMAT_ARCHETYPE gnu_printf #endif #endif void die(const char* fmt, ...) __attribute__((__noreturn__)) __attribute__((__format__(FASTBOOT_FORMAT_ARCHETYPE, 1, 2))); void verbose(const char* fmt, ...) __attribute__((__format__(FASTBOOT_FORMAT_ARCHETYPE, 1, 2))); Loading liblog/include/android/log.h +0 −24 Original line number Diff line number Diff line Loading @@ -115,15 +115,7 @@ 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 ; Loading @@ -133,15 +125,7 @@ int __android_log_print(int prio, const char* tag, const char* fmt, ...) */ int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap) #if defined(__GNUC__) #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO __attribute__((__format__(gnu_printf, 3, 0))) #else __attribute__((__format__(printf, 3, 0))) #endif #else __attribute__((__format__(printf, 3, 0))) #endif #endif ; Loading @@ -164,15 +148,7 @@ 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 ; Loading Loading
adb/sysdeps.h +1 −9 Original line number Diff line number Diff line Loading @@ -41,16 +41,8 @@ // Some printf-like functions are implemented in terms of // android::base::StringAppendV, so they should use the same attribute for // compile-time format string checking. On Windows, if the mingw version of // vsnprintf is used in StringAppendV, use `gnu_printf' which allows z in %zd // and PRIu64 (and related) to be recognized by the compile-time checking. // compile-time format string checking. #define ADB_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef ADB_FORMAT_ARCHETYPE #define ADB_FORMAT_ARCHETYPE gnu_printf #endif #endif #ifdef _WIN32 Loading
base/include/android-base/stringprintf.h +1 −10 Original line number Diff line number Diff line Loading @@ -24,17 +24,8 @@ namespace android { namespace base { // These printf-like functions are implemented in terms of vsnprintf, so they // use the same attribute for compile-time format string checking. On Windows, // if the mingw version of vsnprintf is used, use `gnu_printf' which allows z // in %zd and PRIu64 (and related) to be recognized by the compile-time // checking. // use the same attribute for compile-time format string checking. #define ANDROID_BASE_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef ANDROID_BASE_FORMAT_ARCHETYPE #define ANDROID_BASE_FORMAT_ARCHETYPE gnu_printf #endif #endif // Returns a string corresponding to printf-like formatting of the arguments. std::string StringPrintf(const char* fmt, ...) Loading
fastboot/fastboot.h +1 −10 Original line number Diff line number Diff line Loading @@ -78,17 +78,8 @@ char* xstrdup(const char*); void set_verbose(); // These printf-like functions are implemented in terms of vsnprintf, so they // use the same attribute for compile-time format string checking. On Windows, // if the mingw version of vsnprintf is used, use `gnu_printf' which allows z // in %zd and PRIu64 (and related) to be recognized by the compile-time // checking. // use the same attribute for compile-time format string checking. #define FASTBOOT_FORMAT_ARCHETYPE __printf__ #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO #undef FASTBOOT_FORMAT_ARCHETYPE #define FASTBOOT_FORMAT_ARCHETYPE gnu_printf #endif #endif void die(const char* fmt, ...) __attribute__((__noreturn__)) __attribute__((__format__(FASTBOOT_FORMAT_ARCHETYPE, 1, 2))); void verbose(const char* fmt, ...) __attribute__((__format__(FASTBOOT_FORMAT_ARCHETYPE, 1, 2))); Loading
liblog/include/android/log.h +0 −24 Original line number Diff line number Diff line Loading @@ -115,15 +115,7 @@ 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 ; Loading @@ -133,15 +125,7 @@ int __android_log_print(int prio, const char* tag, const char* fmt, ...) */ int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap) #if defined(__GNUC__) #ifdef __USE_MINGW_ANSI_STDIO #if __USE_MINGW_ANSI_STDIO __attribute__((__format__(gnu_printf, 3, 0))) #else __attribute__((__format__(printf, 3, 0))) #endif #else __attribute__((__format__(printf, 3, 0))) #endif #endif ; Loading @@ -164,15 +148,7 @@ 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 ; Loading