VoiceRecorder.cpp: Use braces to avoid ambiguous "else" #2796

Merged
merged 1 commit into from Feb 2, 2017

Projects

None yet

2 participants

@davidebeatrici
Member

This fixes the following warning when compiling with MinGW:

warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
src/mumble/VoiceRecorder.cpp
@@ -70,11 +70,12 @@ QString VoiceRecorder::sanitizeFilenameOrPathComponent(const QString &str) const
// and http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx
// Make sure name doesn't end in "."
- if (res.at(res.length() - 1) == QLatin1Char('.'))
+ if (res.at(res.length() - 1) == QLatin1Char('.')) {
if (res.length() == 255) // Prevents possible infinite recursion later on
@mkrautz
mkrautz Feb 1, 2017 Member

Please add braces to te inner if-else as well.

@davidebeatrici davidebeatrici VoiceRecorder.cpp: Use braces to avoid ambiguous "else"
This fixes the following warning when compiling with MinGW:
warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
49f9d61
@mkrautz
mkrautz approved these changes Feb 2, 2017 View changes
@mkrautz mkrautz merged commit 077cbfd into mumble-voip:master Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment