X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futil.hpp;h=0a3b8dedfa5b245177b4c4e5e71283e411f85690;hb=8e831f9b2e461c94a8ee0e229812bcf2d42ae2a5;hp=a2f0dbf84bf834e30644c5557d27b0038d9223a1;hpb=9753260ef3e5bad3fc600987dbf9d82af259a4ea;p=staging%2Fwindowmanager.git diff --git a/src/util.hpp b/src/util.hpp index a2f0dbf..0a3b8de 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -8,19 +8,21 @@ #ifdef __GNUC__ #define ATTR_FORMAT(stringindex, firsttocheck) \ __attribute__((format(printf, stringindex, firsttocheck))) +#define ATTR_NORETURN __attribute__((noreturn)) #else #define ATTR_FORMAT(stringindex, firsttocheck) +#define ATTR_NORETURN #endif -void lognotice(char const *fmt, ...) ATTR_FORMAT(1, 2); -void logerror(char const *fmt, ...) ATTR_FORMAT(1, 2); -void fatal(char const *fmt, ...) ATTR_FORMAT(1, 2); +void lognotice(char const *fmt, ...) noexcept ATTR_FORMAT(1, 2); +void logerror(char const *fmt, ...) noexcept ATTR_FORMAT(1, 2); +void fatal(char const *fmt, ...) noexcept ATTR_FORMAT(1, 2) ATTR_NORETURN; #ifdef DEBUG_OUTPUT -void logdebug(char const *fmt, ...) ATTR_FORMAT(1, 2); +void logdebug(char const *fmt, ...) noexcept ATTR_FORMAT(1, 2); #else -static inline void logdebug(char const *fmt, ...) ATTR_FORMAT(1, 2); -static inline void logdebug(char const *fmt, ...) {} +static inline void logdebug(char const *fmt, ...) noexcept ATTR_FORMAT(1, 2); +static inline void logdebug(char const *fmt, ...) noexcept {} #endif // _ _ _ __ _