summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index b5eca16ab..6d33c3830 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -100,15 +100,10 @@ const char *ipToString(const uint32_t address) A_WARN_UNUSED;
/**
* A safe version of sprintf that returns a std::string of the result.
*/
-std::string strprintf(const char *const format, ...) A_NONNULL(1) A_WARN_UNUSED
-#ifdef __GNUC__
-#ifdef __OpenBSD__
- __attribute__((__format__(printf, 1, 2)))
-#else // __OpenBSD__
- __attribute__((__format__(gnu_printf, 1, 2)))
-#endif // __OpenBSD__
-#endif // __GNUC__
-;
+std::string strprintf(const char *const format, ...)
+ A_NONNULL(1)
+ A_WARN_UNUSED
+ A_FORMAT_PRINTF(false, 1, 2);
/**
* Removes colors from a string