From 90487e27d5343cced6541f217a9884e2036dee0c Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Thu, 18 Apr 2024 14:58:16 +0200
Subject: [PATCH] Prevent warning: ISO C requires a translation unit to contain
 at least one declaration [-Wempty-translation-unit]

---
 lib/common/cmp_debug.c | 3 +++
 lib/common/vsnprintf.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/lib/common/cmp_debug.c b/lib/common/cmp_debug.c
index 7d45515..08486ab 100644
--- a/lib/common/cmp_debug.c
+++ b/lib/common/cmp_debug.c
@@ -87,4 +87,7 @@ void cmp_debug_print_impl(const char *fmt, ...)
 	cmp_debug_puts(print_buffer);
 }
 
+#else
+/* prevent warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit] */
+extern int make_iso_compilers_happy;
 #endif /* (DEBUGLEVEL > 0) */
diff --git a/lib/common/vsnprintf.c b/lib/common/vsnprintf.c
index b1cefe0..87a75e1 100644
--- a/lib/common/vsnprintf.c
+++ b/lib/common/vsnprintf.c
@@ -884,4 +884,8 @@ int my_vsnprintf(char* buffer, size_t count, const char* format, va_list va)
 	return _vsnprintf(_out_buffer, buffer, count, format, va);
 }
 
+#else
+/* prevent warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit] */
+extern int make_iso_compilers_happy;
+
 #endif /* (DEBUGLEVEL > 0) */
-- 
GitLab