Media Kit: Fix/appease various GCC 11 warnings.
This commit is contained in:
@@ -1561,7 +1561,7 @@ BMediaRoster::PrerollNode(const media_node& node)
|
|||||||
if (IS_INVALID_NODE(node))
|
if (IS_INVALID_NODE(node))
|
||||||
return B_MEDIA_BAD_NODE;
|
return B_MEDIA_BAD_NODE;
|
||||||
|
|
||||||
char dummy;
|
char dummy = 0;
|
||||||
return write_port(node.port, NODE_PREROLL, &dummy, sizeof(dummy));
|
return write_port(node.port, NODE_PREROLL, &dummy, sizeof(dummy));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Executable → Regular
+4
-4
@@ -581,12 +581,12 @@ BMediaClient::_ReleaseConnection(BMediaConnection* conn)
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
if (conn->Connection().IsInput()) {
|
if (conn->Connection().IsInput()) {
|
||||||
InputReleaser obj = InputReleaser(dynamic_cast<BMediaInput*>(conn));
|
InputReleaser obj(dynamic_cast<BMediaInput*>(conn));
|
||||||
fInputs.RemoveItem(&obj);
|
fInputs.RemoveItem(&obj, false);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
} else {
|
} else {
|
||||||
OutputReleaser obj = OutputReleaser(dynamic_cast<BMediaOutput*>(conn));
|
OutputReleaser obj(dynamic_cast<BMediaOutput*>(conn));
|
||||||
fOutputs.RemoveItem(&obj);
|
fOutputs.RemoveItem(&obj, false);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -549,7 +549,7 @@ MediaAddonServer::_AddOnAdded(const char* path, ino_t fileNode)
|
|||||||
// put file's inode and addon's id into map
|
// put file's inode and addon's id into map
|
||||||
fFileMap.insert(std::make_pair(fileNode, id));
|
fFileMap.insert(std::make_pair(fileNode, id));
|
||||||
|
|
||||||
AddOnInfo info;
|
AddOnInfo info = {};
|
||||||
fInfoMap.insert(std::make_pair(id, info));
|
fInfoMap.insert(std::make_pair(id, info));
|
||||||
} catch (std::bad_alloc& exception) {
|
} catch (std::bad_alloc& exception) {
|
||||||
fFileMap.erase(fileNode);
|
fFileMap.erase(fileNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user