From f7338bb6a0e432522ba67098b7a75976c708ffd5 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 17 Nov 2021 18:45:35 -0500 Subject: [PATCH] Media Kit: Fix/appease various GCC 11 warnings. --- src/kits/media/MediaRoster.cpp | 2 +- src/kits/media/experimental/MediaClient.cpp | 8 ++++---- src/servers/media_addon/MediaAddonServer.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 src/kits/media/experimental/MediaClient.cpp diff --git a/src/kits/media/MediaRoster.cpp b/src/kits/media/MediaRoster.cpp index e418b4adc9..d162c5f3e3 100644 --- a/src/kits/media/MediaRoster.cpp +++ b/src/kits/media/MediaRoster.cpp @@ -1561,7 +1561,7 @@ BMediaRoster::PrerollNode(const media_node& node) if (IS_INVALID_NODE(node)) return B_MEDIA_BAD_NODE; - char dummy; + char dummy = 0; return write_port(node.port, NODE_PREROLL, &dummy, sizeof(dummy)); } diff --git a/src/kits/media/experimental/MediaClient.cpp b/src/kits/media/experimental/MediaClient.cpp old mode 100755 new mode 100644 index 70fe70702e..4bf4835091 --- a/src/kits/media/experimental/MediaClient.cpp +++ b/src/kits/media/experimental/MediaClient.cpp @@ -581,12 +581,12 @@ BMediaClient::_ReleaseConnection(BMediaConnection* conn) return B_ERROR; if (conn->Connection().IsInput()) { - InputReleaser obj = InputReleaser(dynamic_cast(conn)); - fInputs.RemoveItem(&obj); + InputReleaser obj(dynamic_cast(conn)); + fInputs.RemoveItem(&obj, false); return B_OK; } else { - OutputReleaser obj = OutputReleaser(dynamic_cast(conn)); - fOutputs.RemoveItem(&obj); + OutputReleaser obj(dynamic_cast(conn)); + fOutputs.RemoveItem(&obj, false); return B_OK; } diff --git a/src/servers/media_addon/MediaAddonServer.cpp b/src/servers/media_addon/MediaAddonServer.cpp index 891f4cf061..1b4e491c28 100644 --- a/src/servers/media_addon/MediaAddonServer.cpp +++ b/src/servers/media_addon/MediaAddonServer.cpp @@ -549,7 +549,7 @@ MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode) // put file's inode and addon's id into map fFileMap.insert(std::make_pair(fileNode, id)); - AddOnInfo info; + AddOnInfo info = {}; fInfoMap.insert(std::make_pair(id, info)); } catch (std::bad_alloc& exception) { fFileMap.erase(fileNode);