]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_shout] fix build with new clang on macOS 2395/head
authorSeven Du <dujinfang@x-y-t.cn>
Tue, 27 Feb 2024 01:22:19 +0000 (09:22 +0800)
committerSeven Du <dujinfang@x-y-t.cn>
Tue, 21 Jan 2025 00:51:24 +0000 (08:51 +0800)
fix error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
Apple clang version 15.0.0 (clang-1500.1.0.2.5)

src/mod/formats/mod_shout/mod_shout.c

index be05ba5c323431771a57a033d88b37c9d6db4ad2..d6cad23bbd25dea376ed38f8aca26810d9cedfc4 100644 (file)
@@ -619,7 +619,11 @@ static void *SWITCH_THREAD_FUNC write_stream_thread(switch_thread_t *thread, voi
                        }
                } else {
                        memset(mp3buf, 0, 128);
-                       shout_send(context->shout, mp3buf, 128);
+                       ret = shout_send(context->shout, mp3buf, 128);
+                       if (ret != SHOUTERR_SUCCESS) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Send error: %s\n", shout_get_error(context->shout));
+                               goto error;
+                       }
                }
 
                shout_sync(context->shout);