From df4aea5adaee2bb62948e822b617b0341c3c43d5 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 30 Mar 2023 12:58:11 +0200 Subject: mmtty: handle MM_LOG_LEVEL_MSG in _mm_log() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 13 is unhappy about mixing enums and ints. However, if we fix the type un mmtty's _mm_log() prototype, the compiler will find something else to be irritiated about: [1/2] Compiling C object test/mmtty.p/mmtty.c.o ../test/mmtty.c: In function ‘_mm_log’: ../test/mmtty.c:283:5: warning: enumeration value ‘MM_LOG_LEVEL_MSG’ not handled in switch [-Wswitch-enum] 283 | switch (level) { | ^~~~~~ [2/2] Linking target test/mmtty Fix that first. --- test/mmtty.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/mmtty.c b/test/mmtty.c index 5e8e16b0..f12da0f7 100644 --- a/test/mmtty.c +++ b/test/mmtty.c @@ -281,6 +281,9 @@ _mm_log (gpointer obj, return; switch (level) { + case MM_LOG_LEVEL_MSG: + level_str = "message"; + break; case MM_LOG_LEVEL_DEBUG: level_str = "debug"; break; -- cgit v1.2.3-70-g09d2