Cortex: fix some unused-but-set warnings
Declare the variables as unused because they are used only in ASSERT calls which are disabled by default. Change-Id: I4786fad54463b532b00afa5be00ed52fb118776f Reviewed-on: https://review.haiku-os.org/c/haiku/+/6737 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -142,7 +142,7 @@ void _do_for_each_connected(
|
|||||||
|
|
||||||
ASSERT(origin);
|
ASSERT(origin);
|
||||||
ASSERT(state);
|
ASSERT(state);
|
||||||
status_t err;
|
status_t err __attribute__((unused));
|
||||||
|
|
||||||
if(state->visited.find(origin->id()) != state->visited.end()) {
|
if(state->visited.find(origin->id()) != state->visited.end()) {
|
||||||
// PRINT(("### already visited\n"));
|
// PRINT(("### already visited\n"));
|
||||||
@@ -605,7 +605,7 @@ bool NodeManager::_find_route_recurse(
|
|||||||
ASSERT(IsLocked());
|
ASSERT(IsLocked());
|
||||||
ASSERT(origin);
|
ASSERT(origin);
|
||||||
ASSERT(state);
|
ASSERT(state);
|
||||||
status_t err;
|
status_t err __attribute__((unused));
|
||||||
|
|
||||||
// node already visited?
|
// node already visited?
|
||||||
if(state->visited.find(origin->id()) != state->visited.end()) {
|
if(state->visited.find(origin->id()) != state->visited.end()) {
|
||||||
@@ -857,8 +857,6 @@ status_t NodeManager::mergeGroups(
|
|||||||
D_METHOD((
|
D_METHOD((
|
||||||
"NodeManager::mergeGroups(name)\n"));
|
"NodeManager::mergeGroups(name)\n"));
|
||||||
|
|
||||||
status_t err;
|
|
||||||
|
|
||||||
// [5feb00 c.lenz] already merged
|
// [5feb00 c.lenz] already merged
|
||||||
if(sourceGroup->id() == destinationGroup->id())
|
if(sourceGroup->id() == destinationGroup->id())
|
||||||
return B_OK;
|
return B_OK;
|
||||||
@@ -869,7 +867,7 @@ status_t NodeManager::mergeGroups(
|
|||||||
for(uint32 n = sourceGroup->countNodes(); n; --n) {
|
for(uint32 n = sourceGroup->countNodes(); n; --n) {
|
||||||
NodeRef* node = sourceGroup->nodeAt(n-1);
|
NodeRef* node = sourceGroup->nodeAt(n-1);
|
||||||
ASSERT(node);
|
ASSERT(node);
|
||||||
err = sourceGroup->removeNode(n-1);
|
status_t err __attribute__((unused)) = sourceGroup->removeNode(n-1);
|
||||||
ASSERT(err == B_OK);
|
ASSERT(err == B_OK);
|
||||||
err = destinationGroup->addNode(node);
|
err = destinationGroup->addNode(node);
|
||||||
ASSERT(err == B_OK);
|
ASSERT(err == B_OK);
|
||||||
@@ -913,7 +911,7 @@ public:
|
|||||||
PRINT((
|
PRINT((
|
||||||
"_changeNodeGroupFn(): '%s'\n", node->name()));
|
"_changeNodeGroupFn(): '%s'\n", node->name()));
|
||||||
|
|
||||||
status_t err;
|
status_t err __attribute__((unused));
|
||||||
NodeGroup* oldGroup = node->group();
|
NodeGroup* oldGroup = node->group();
|
||||||
if(oldGroup) {
|
if(oldGroup) {
|
||||||
err = oldGroup->removeNode(node);
|
err = oldGroup->removeNode(node);
|
||||||
|
|||||||
@@ -336,12 +336,10 @@ bigtime_t NodeRef::recordingDelay() const {
|
|||||||
bigtime_t NodeRef::calculateRecordingModeDelay() {
|
bigtime_t NodeRef::calculateRecordingModeDelay() {
|
||||||
PRINT((
|
PRINT((
|
||||||
"NodeRef::calculateRecordingModeDelay()\n"));
|
"NodeRef::calculateRecordingModeDelay()\n"));
|
||||||
status_t err;
|
|
||||||
|
|
||||||
bigtime_t maxBufferDur = 0LL;
|
bigtime_t maxBufferDur = 0LL;
|
||||||
|
|
||||||
vector<Connection> outputConnections;
|
vector<Connection> outputConnections;
|
||||||
err = getOutputConnections(outputConnections);
|
getOutputConnections(outputConnections);
|
||||||
for(
|
for(
|
||||||
vector<Connection>::iterator it = outputConnections.begin();
|
vector<Connection>::iterator it = outputConnections.begin();
|
||||||
it != outputConnections.end(); ++it) {
|
it != outputConnections.end(); ++it) {
|
||||||
@@ -352,8 +350,7 @@ bigtime_t NodeRef::calculateRecordingModeDelay() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bigtime_t latency = 0LL;
|
bigtime_t latency = 0LL;
|
||||||
err = m_manager->roster->GetLatencyFor(
|
m_manager->roster->GetLatencyFor(node(), &latency);
|
||||||
node(), &latency);
|
|
||||||
|
|
||||||
PRINT((
|
PRINT((
|
||||||
" %" B_PRIdBIGTIME "\n", latency));
|
" %" B_PRIdBIGTIME "\n", latency));
|
||||||
|
|||||||
@@ -245,7 +245,6 @@ void RouteApp::xmlExportAttributes(
|
|||||||
void RouteApp::xmlExportContent(
|
void RouteApp::xmlExportContent(
|
||||||
ExportContext& context) const {
|
ExportContext& context) const {
|
||||||
|
|
||||||
status_t err;
|
|
||||||
context.beginContent();
|
context.beginContent();
|
||||||
|
|
||||||
// export app settings
|
// export app settings
|
||||||
@@ -253,7 +252,7 @@ void RouteApp::xmlExportContent(
|
|||||||
BMessage m;
|
BMessage m;
|
||||||
exportState(&m);
|
exportState(&m);
|
||||||
MessageIO io(&m);
|
MessageIO io(&m);
|
||||||
err = context.writeObject(&io);
|
status_t err __attribute__((unused)) = context.writeObject(&io);
|
||||||
ASSERT(err == B_OK);
|
ASSERT(err == B_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1065,7 +1065,7 @@ void TransportView::_updateTimeSource() {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
if(n < 0)
|
if(n < 0)
|
||||||
menu->Superitem()->SetLabel(B_TRANSLATE("(???)"));
|
menu->Superitem()->SetLabel(B_TRANSLATE("(\?\?\?)"));
|
||||||
|
|
||||||
}
|
}
|
||||||
void TransportView::_updateRunMode() {
|
void TransportView::_updateRunMode() {
|
||||||
|
|||||||
@@ -445,20 +445,19 @@ NumericValControl::updateParameter(double value)
|
|||||||
// bigtime_t tpNow = system_time();
|
// bigtime_t tpNow = system_time();
|
||||||
|
|
||||||
// store value
|
// store value
|
||||||
status_t err;
|
|
||||||
switch (fParam->ValueType()) {
|
switch (fParam->ValueType()) {
|
||||||
case B_FLOAT_TYPE:
|
case B_FLOAT_TYPE:
|
||||||
{ // +++++ left-channel hack
|
{ // +++++ left-channel hack
|
||||||
float fValue[2];
|
float fValue[2];
|
||||||
fValue[0] = value;
|
fValue[0] = value;
|
||||||
fValue[1] = value;
|
fValue[1] = value;
|
||||||
err = fParam->SetValue((void*)&fValue, sizeof(float)*2, 0LL);
|
fParam->SetValue((void*)&fValue, sizeof(float)*2, 0LL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case B_DOUBLE_TYPE: {
|
case B_DOUBLE_TYPE: {
|
||||||
double fValue = value;
|
double fValue = value;
|
||||||
err = fParam->SetValue((void*)&fValue, sizeof(double), 0LL);
|
fParam->SetValue((void*)&fValue, sizeof(double), 0LL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ ValControlDigitSegment::ValControlDigitSegment(BMessage* pArchive) :
|
|||||||
m_digitPadding(0.0) {
|
m_digitPadding(0.0) {
|
||||||
|
|
||||||
// #/digits
|
// #/digits
|
||||||
status_t err = pArchive->FindInt16("digits", (int16*)&m_digitCount);
|
status_t err __attribute__((unused)) = pArchive->FindInt16("digits", (int16*)&m_digitCount);
|
||||||
ASSERT(err == B_OK);
|
ASSERT(err == B_OK);
|
||||||
|
|
||||||
// current value
|
// current value
|
||||||
|
|||||||
Reference in New Issue
Block a user