From 2c82a6b2e0095ae9921be36fcf32ebd2507acb98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Apr 2022 15:28:23 +0200 Subject: [PATCH] output/shout: handle shout_metadata_add() errors Fixes -Wunused-result --- src/output/plugins/ShoutOutputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output/plugins/ShoutOutputPlugin.cxx b/src/output/plugins/ShoutOutputPlugin.cxx index 507220ee4..0dafe8b5c 100644 --- a/src/output/plugins/ShoutOutputPlugin.cxx +++ b/src/output/plugins/ShoutOutputPlugin.cxx @@ -446,9 +446,9 @@ ShoutOutput::SendTag(const Tag &tag) char song[1024]; shout_tag_to_metadata(tag, song, sizeof(song)); - shout_metadata_add(meta, "song", song); - shout_metadata_add(meta, "charset", "UTF-8"); - if (SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta)) { + if (SHOUTERR_SUCCESS != shout_metadata_add(meta, "song", song) || + SHOUTERR_SUCCESS != shout_metadata_add(meta, "charset", "UTF-8") || + SHOUTERR_SUCCESS != shout_set_metadata(shout_conn, meta)) { LogWarning(shout_output_domain, "error setting shout metadata"); }