summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-06-26 13:06:15 -0700
committerElliott Hughes <enh@google.com>2018-06-26 13:07:21 -0700
commitd8a4c60276667f6f08d02314da4eb6f0f741fb5d (patch)
treea1e47bcb7c2101647ef4f5bcb6b23c75a1730bf2 /base
parentb8f4fe4fd46fb9c5e1f53d4f3fcc87c7bd63ee7d (diff)
downloadsystem_core-d8a4c60276667f6f08d02314da4eb6f0f741fb5d.tar.gz
system_core-d8a4c60276667f6f08d02314da4eb6f0f741fb5d.tar.bz2
system_core-d8a4c60276667f6f08d02314da4eb6f0f741fb5d.zip
Simplify __attribute__((__printf__)) use.
We don't need this now everyone's using clang... Bug: http://b/69933068 Test: ran tests Change-Id: I88f0cf03981ade47e210387fd6f3a2706dfeb9b8
Diffstat (limited to 'base')
-rw-r--r--base/include/android-base/stringprintf.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/base/include/android-base/stringprintf.h b/base/include/android-base/stringprintf.h
index 517e69e17..c13d25d37 100644
--- a/base/include/android-base/stringprintf.h
+++ b/base/include/android-base/stringprintf.h
@@ -25,21 +25,17 @@ namespace base {
// These printf-like functions are implemented in terms of vsnprintf, so they
// use the same attribute for compile-time format string checking.
-#define ANDROID_BASE_FORMAT_ARCHETYPE __printf__
// Returns a string corresponding to printf-like formatting of the arguments.
-std::string StringPrintf(const char* fmt, ...)
- __attribute__((__format__(ANDROID_BASE_FORMAT_ARCHETYPE, 1, 2)));
+std::string StringPrintf(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
// Appends a printf-like formatting of the arguments to 'dst'.
void StringAppendF(std::string* dst, const char* fmt, ...)
- __attribute__((__format__(ANDROID_BASE_FORMAT_ARCHETYPE, 2, 3)));
+ __attribute__((__format__(__printf__, 2, 3)));
// Appends a printf-like formatting of the arguments to 'dst'.
void StringAppendV(std::string* dst, const char* format, va_list ap)
- __attribute__((__format__(ANDROID_BASE_FORMAT_ARCHETYPE, 2, 0)));
-
-#undef ANDROID_BASE_FORMAT_ARCHETYPE
+ __attribute__((__format__(__printf__, 2, 0)));
} // namespace base
} // namespace android