Media Kit: Fix/appease various GCC 11 warnings.

This commit is contained in:
Augustin Cavalier 2021-11-17 18:45:35 -05:00
parent 181529ce0c
commit f7338bb6a0
3 changed files with 6 additions and 6 deletions

View File

@ -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));
}

8
src/kits/media/experimental/MediaClient.cpp Executable file → Normal file
View File

@ -581,12 +581,12 @@ BMediaClient::_ReleaseConnection(BMediaConnection* conn)
return B_ERROR;
if (conn->Connection().IsInput()) {
InputReleaser obj = InputReleaser(dynamic_cast<BMediaInput*>(conn));
fInputs.RemoveItem(&obj);
InputReleaser obj(dynamic_cast<BMediaInput*>(conn));
fInputs.RemoveItem(&obj, false);
return B_OK;
} else {
OutputReleaser obj = OutputReleaser(dynamic_cast<BMediaOutput*>(conn));
fOutputs.RemoveItem(&obj);
OutputReleaser obj(dynamic_cast<BMediaOutput*>(conn));
fOutputs.RemoveItem(&obj, false);
return B_OK;
}

View File

@ -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);