From 7d446c3a37f7583b7e8e720f8e0ff0b1ed3dd274 Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Thu, 24 Mar 2022 14:42:16 +0000 Subject: Make it obvious to the compiler that nullptr format string is not possible --- vespalib/src/vespa/vespalib/data/slime/strfmt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vespalib') diff --git a/vespalib/src/vespa/vespalib/data/slime/strfmt.h b/vespalib/src/vespa/vespalib/data/slime/strfmt.h index e1a24ce505d..01e60eac3c0 100644 --- a/vespalib/src/vespa/vespalib/data/slime/strfmt.h +++ b/vespalib/src/vespa/vespalib/data/slime/strfmt.h @@ -8,8 +8,8 @@ namespace vespalib::slime { extern std::string strfmt(const char *fmt, ...) #ifdef __GNUC__ - // Add printf format checks with gcc - __attribute__ ((format (printf,1,2))) + __attribute__ ((format (printf,1,2))) // Add printf format checks with gcc + __attribute__((nonnull(1))) // Format string can never be null #endif ; -- cgit v1.2.3