Skip to content

Commit 21a701a

Browse files
committed
Fix control reaches end of non-void function warning
1 parent 631c756 commit 21a701a

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

Source/CoreServices.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ namespace CoreServices
268268
if (node->getNodeId() == nodeId)
269269
return node->getEngineId();
270270
}
271+
return String("NO_MATCHING_NODE_FOUND");
271272
}
272273

273274
void setRecordEngine(String id, int nodeId, bool applyToAll)

Source/Processors/GenericProcessor/GenericProcessor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,6 +1923,8 @@ Plugin::Processor::Type GenericProcessor::typeFromString(String typeName)
19231923
return Plugin::Processor::SINK;
19241924
else if (typeName.equalsIgnoreCase("Utility"))
19251925
return Plugin::Processor::UTILITY;
1926+
else
1927+
return Plugin::Processor::INVALID;
19261928
}
19271929

19281930
int GenericProcessor::getNumInputs() const

Source/Processors/MessageCenter/MessageCenter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ DataStream* MessageCenter::getMessageStream()
104104
{
105105
if (dataStreams.size() > 0)
106106
return dataStreams[0];
107+
108+
return nullptr;
107109
}
108110

109111
void MessageCenter::setParameter(int parameterIndex, float newValue)

Source/Processors/SourceNode/SourceNode.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ float SourceNode::getSampleRate(int streamId) const
150150
if (stream->getStreamId() == streamId)
151151
return stream->getSampleRate();
152152
}
153-
else
154-
return 44100.0;
153+
return 44100.0;
155154
}
156155

157156

Source/UI/ControlPanel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,7 @@ String ControlPanel::getRecordingDirectoryPrependText()
11881188
return field->value;
11891189
}
11901190
}
1191+
return "";
11911192
}
11921193

11931194
void ControlPanel::setRecordingDirectoryPrependText(String text)
@@ -1230,6 +1231,7 @@ String ControlPanel::getRecordingDirectoryAppendText()
12301231
return field->value;
12311232
}
12321233
}
1234+
return "";
12331235
}
12341236

12351237
void ControlPanel::setRecordingDirectoryAppendText(String text)
@@ -1272,6 +1274,7 @@ String ControlPanel::getRecordingDirectoryBaseText()
12721274
return field->value;
12731275
}
12741276
}
1277+
return "";
12751278
}
12761279

12771280
void ControlPanel::setRecordingDirectoryBaseText(String text)

Source/UI/FilenameConfigWindow.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,7 @@ String FilenameFieldComponent::getNextValue(bool usePlaceholderText)
217217
}
218218
}
219219
}
220-
else {
221-
222-
//std::cout << "New directory NOT needed." << std::endl;
223-
//std::cout << "Returning: " << value << std::endl;
224-
225-
return value;
226-
}
227-
220+
return value;
228221

229222
}
230223

0 commit comments

Comments
 (0)