diff options
author | Tor Egge <Tor.Egge@yahooinc.com> | 2022-03-24 16:14:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 16:14:53 +0100 |
commit | 7bb6db91823f2f11782e3a362414d27a062da6ee (patch) | |
tree | f53f66a7f5347d70b278e2b14d5233ce437cea13 /vespalib | |
parent | 6e997e07b9d350f880252f27752668bbbaca8a36 (diff) | |
parent | 7d446c3a37f7583b7e8e720f8e0ff0b1ed3dd274 (diff) |
Merge pull request #21813 from vespa-engine/vekterli/avoid-compile-time-possible-nullptr-warnings
Make it obvious to the compiler that nullptr format string is not possible
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/data/slime/strfmt.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 ; |