summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Gregor Jasny <gjasny@googlemail.com>2018-02-09 09:48:24 +0100
committerGravatar Gregor Jasny <gjasny@googlemail.com>2018-02-09 09:48:24 +0100
commit282daf63c3f7a897c8d2ca2194852d41fc2edc42 (patch)
tree2c3b5f3a9188611098184f157b9ee401d8112640
parent8311b41974e50f2753921ba986bbd188f9bc28a0 (diff)
Annotate printf-like functions as such
-rw-r--r--absl/base/internal/raw_logging.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc
index 86e34d45..473d9f7a 100644
--- a/absl/base/internal/raw_logging.cc
+++ b/absl/base/internal/raw_logging.cc
@@ -81,6 +81,8 @@ static const char kTruncated[] = " ... (message truncated)\n";
// consumed bytes, and return whether the message fit without truncation. If
// truncation occurred, if possible leave room in the buffer for the message
// kTruncated[].
+inline static bool VADoRawLog(char** buf, int* size, const char* format,
+ va_list ap) ABSL_PRINTF_ATTRIBUTE(3, 0);
inline static bool VADoRawLog(char** buf, int* size,
const char* format, va_list ap) {
int n = vsnprintf(*buf, *size, format, ap);
@@ -129,6 +131,8 @@ bool DoRawLog(char** buf, int* size, const char* format, ...) {
}
void RawLogVA(absl::LogSeverity severity, const char* file, int line,
+ const char* format, va_list ap) ABSL_PRINTF_ATTRIBUTE(4, 0);
+void RawLogVA(absl::LogSeverity severity, const char* file, int line,
const char* format, va_list ap) {
char buffer[kLogBufSize];
char* buf = buffer;
@@ -204,6 +208,8 @@ void SafeWriteToStderr(const char *s, size_t len) {
}
void RawLog(absl::LogSeverity severity, const char* file, int line,
+ const char* format, ...) ABSL_PRINTF_ATTRIBUTE(4, 5);
+void RawLog(absl::LogSeverity severity, const char* file, int line,
const char* format, ...) {
va_list ap;
va_start(ap, format);