summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp8
-rw-r--r--src/util.hpp14
-rw-r--r--src/wayland.cpp1
3 files changed, 13 insertions, 10 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 482003e..623702d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -35,21 +35,21 @@ static void log_(char const *log_type, FILE *stream, char const *fmt,
fputs("\n", stream);
}
-void lognotice(char const *fmt, ...) {
+void lognotice(char const *fmt, ...) noexcept {
va_list a;
va_start(a, fmt);
log_("notice", stdout, fmt, a);
va_end(a);
}
-void logerror(char const *fmt, ...) {
+void logerror(char const *fmt, ...) noexcept {
va_list a;
va_start(a, fmt);
log_("error", stderr, fmt, a);
va_end(a);
}
-void fatal(char const *fmt, ...) {
+void fatal(char const *fmt, ...) noexcept {
va_list a;
va_start(a, fmt);
log_("fatal", stderr, fmt, a);
@@ -58,7 +58,7 @@ void fatal(char const *fmt, ...) {
}
#ifdef DEBUG_OUTPUT
-void logdebug(char const *fmt, ...) {
+void logdebug(char const *fmt, ...) noexcept {
va_list a;
va_start(a, fmt);
log_("debug", stdout, fmt, a);
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
// _ _ _ __ _
diff --git a/src/wayland.cpp b/src/wayland.cpp
index 8b44852..276ec7a 100644
--- a/src/wayland.cpp
+++ b/src/wayland.cpp
@@ -741,6 +741,7 @@ void controller::debug_dump_current_status() {
puts("\b\b ");
}
}
+
//
// ___ ___ _ __ ___ ___ _ __
// / __|/ __| '__/ _ \/ _ \ '_ \