]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_imagick] Fix build on newer compiler by adding noreturn attribute. 2851/head
authorAndrey Volk <andywolk@gmail.com>
Sun, 13 Jul 2025 23:41:26 +0000 (02:41 +0300)
committerAndrey Volk <andywolk@gmail.com>
Sun, 13 Jul 2025 23:41:26 +0000 (02:41 +0300)
src/mod/formats/mod_imagick/mod_imagick.c

index 5c185a5e44d7ad96e1c63bc31faba27c2230d05f..05f253df6c16dd461b91eeff28b0b39f980ba3f8 100644 (file)
@@ -488,9 +488,16 @@ static void myErrorHandler(const ExceptionType t, const char *reason, const char
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s: %s\n", reason, description);
 }
 
-static void myFatalErrorHandler(const ExceptionType t, const char *reason, const char *description)
+static
+#if defined(_MSC_VER) && defined(_WIN32)
+#else
+ __attribute__((noreturn)) 
+#endif
+void myFatalErrorHandler(const ExceptionType t, const char *reason, const char *description)
 {
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%s: %s\n", reason, description);
+       /* Make sure the function never returns */
+       abort();
 }
 
 static void myWarningHandler(const ExceptionType t, const char *reason, const char *description)