cortex: Remove dead code

Pointed out by clang static analyzer.

Change-Id: Ic647109e5e7d2e304be6f8c542ea9bfca551c3a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3271
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Murai Takashi 2020-09-24 19:39:07 +09:00 committed by Adrien Destugues
parent d7093b2437
commit f30ba67705
4 changed files with 6 additions and 10 deletions

View File

@ -86,8 +86,7 @@ DormantNodeWindow::DormantNodeWindow(
r.left = r.right + 1.0;
r.right = r.left + B_V_SCROLL_BAR_WIDTH;
r.InsetBy(0.0, -1.0);
BScrollBar *scrollBar;
AddChild(scrollBar = new BScrollBar(r, "", m_listView, 0.0, 0.0, B_VERTICAL));
AddChild(new BScrollBar(r, "", m_listView, 0.0, 0.0, B_VERTICAL));
// Add the ListView
AddChild(m_listView);

View File

@ -739,7 +739,6 @@ void MediaJack::showContextMenu(
BPopUpMenu *menu = new BPopUpMenu("MediaJack PopUp", false, false, B_ITEMS_IN_COLUMN);
menu->SetFont(be_plain_font);
BMenuItem *item;
// add the "Get Info" item
if (isInput())
@ -749,7 +748,7 @@ void MediaJack::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("input", B_RAW_TYPE,
reinterpret_cast<const void *>(&input), sizeof(input));
menu->AddItem(item = new BMenuItem("Get info", message));
menu->AddItem(new BMenuItem("Get info", message));
}
else if (isOutput())
{
@ -758,7 +757,7 @@ void MediaJack::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("output", B_RAW_TYPE,
reinterpret_cast<const void *>(&output), sizeof(output));
menu->AddItem(item = new BMenuItem("Get info", message));
menu->AddItem(new BMenuItem("Get info", message));
}
menu->SetTargetForItems(view());

View File

@ -341,8 +341,7 @@ void MediaNodePanel::updateIOJacks()
ref->getFreeInputs(freeInputs);
for (uint32 i = 0; i < freeInputs.size(); i++)
{
MediaJack *jack;
AddItem(jack = new MediaJack(freeInputs[i]));
AddItem(new MediaJack(freeInputs[i]));
}
}
@ -353,8 +352,7 @@ void MediaNodePanel::updateIOJacks()
ref->getFreeOutputs(freeOutputs);
for (uint32 i = 0; i < freeOutputs.size(); i++)
{
MediaJack *jack;
AddItem(jack = new MediaJack(freeOutputs[i]));
AddItem(new MediaJack(freeOutputs[i]));
}
}

View File

@ -322,7 +322,7 @@ void MediaWire::showContextMenu(
BMessage *message = new BMessage(InfoWindowManager::M_INFO_WINDOW_REQUESTED);
message->AddData("connection", B_RAW_TYPE,
reinterpret_cast<const void *>(&output), sizeof(output));
menu->AddItem(item = new BMenuItem("Get info", message, 'I'));
menu->AddItem(new BMenuItem("Get info", message, 'I'));
// add the "Disconnect" item
menu->AddItem(item = new BMenuItem("Disconnect", new BMessage(MediaRoutingView::M_DELETE_SELECTION), 'T'));