From 282daf63c3f7a897c8d2ca2194852d41fc2edc42 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Fri, 9 Feb 2018 09:48:24 +0100 Subject: Annotate printf-like functions as such --- absl/base/internal/raw_logging.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'absl/base/internal/raw_logging.cc') 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); @@ -128,6 +130,8 @@ bool DoRawLog(char** buf, int* size, const char* format, ...) { return true; } +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]; @@ -203,6 +207,8 @@ void SafeWriteToStderr(const char *s, size_t len) { #endif } +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; -- cgit v1.2.3 From 4f45903993aa8cb23bfc565c245980f6bd704fb0 Mon Sep 17 00:00:00 2001 From: Derek Mauro <761129+derekmauro@users.noreply.github.com> Date: Fri, 9 Feb 2018 11:12:03 -0500 Subject: #include "absl/base/attributes.h" --- absl/base/internal/raw_logging.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'absl/base/internal/raw_logging.cc') diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc index 473d9f7a..7a32edde 100644 --- a/absl/base/internal/raw_logging.cc +++ b/absl/base/internal/raw_logging.cc @@ -20,6 +20,7 @@ #include #include +#include "absl/base/attributes.h" #include "absl/base/config.h" #include "absl/base/internal/atomic_hook.h" #include "absl/base/log_severity.h" -- cgit v1.2.3