diff --git a/lib/common/cmp_debug.c b/lib/common/cmp_debug.c
index 7d45515154fcd15a6e86d2d641159dfc30f94915..08486ab0af9a2dbf0a9cc3ecd668221202cdff82 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 b1cefe0ed8f19c2d29d8f4ff3cb9e5cfdd36a1c4..87a75e1f7fd8fd1526ae7144a9c040c4a5620c95 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) */