diff options
author | David Robillard <d@drobilla.net> | 2017-02-12 18:19:24 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-12 18:19:24 +0100 |
commit | 2baf4a1e5393297ce298184cfafe39800f7242ac (patch) | |
tree | 44dbba215d7030ea0912bda77818101511640c31 | |
parent | 587316ca143e12d0efcdc95569b4eed40da96189 (diff) | |
download | mda.lv2-2baf4a1e5393297ce298184cfafe39800f7242ac.tar.gz mda.lv2-2baf4a1e5393297ce298184cfafe39800f7242ac.tar.bz2 mda.lv2-2baf4a1e5393297ce298184cfafe39800f7242ac.zip |
Fix misleading indentation warnings with GCC 6
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/mdaBeatBox.cpp | 6 | ||||
-rw-r--r-- | src/mdaCombo.cpp | 3 | ||||
-rw-r--r-- | src/mdaDither.cpp | 3 | ||||
-rw-r--r-- | src/mdaDynamics.cpp | 6 | ||||
-rw-r--r-- | src/mdaEPiano.cpp | 3 | ||||
-rw-r--r-- | src/mdaJX10.cpp | 6 | ||||
-rw-r--r-- | src/mdaLimiter.cpp | 3 | ||||
-rw-r--r-- | src/mdaLoudness.cpp | 3 | ||||
-rw-r--r-- | src/mdaMultiBand.cpp | 3 | ||||
-rw-r--r-- | src/mdaRePsycho.cpp | 3 | ||||
-rw-r--r-- | src/mdaRezFilter.cpp | 3 | ||||
-rw-r--r-- | src/mdaStereo.cpp | 3 | ||||
-rw-r--r-- | src/mdaTestTone.cpp | 8 | ||||
-rw-r--r-- | src/mdaThruZero.cpp | 3 | ||||
-rw-r--r-- | src/mdaVocInput.cpp | 3 | ||||
-rw-r--r-- | src/mdaVocoder.cpp | 3 |
17 files changed, 43 insertions, 22 deletions
@@ -2,8 +2,9 @@ mda-lv2 (1.2.3) unstable; * Fix initial noise with Piano (zero comb filter and voices on startup) * Fix invalid Vocoder preset description + * Fix misleading indentation warnings with GCC 6 - -- David Robillard <d@drobilla.net> Thu, 19 Feb 2015 04:32:46 -0500 + -- David Robillard <d@drobilla.net> Sun, 12 Feb 2017 18:16:11 +0100 mda-lv2 (1.2.2) stable; diff --git a/src/mdaBeatBox.cpp b/src/mdaBeatBox.cpp index 292ecae..6bc5ea1 100644 --- a/src/mdaBeatBox.cpp +++ b/src/mdaBeatBox.cpp @@ -397,7 +397,8 @@ void mdaBeatBox::process(float **inputs, float **outputs, int32_t sampleFrames) case 3: if(recpos<kl) *(kbuf + recpos++) = e; else e=0.f; break; case 4: if(recpos<sl) { *(sbuf+recpos)=a; *(sbuf2+recpos)=b; recpos++; } - else e=0.f; break; + else e=0.f; + break; } } c = out1[1] + e; @@ -489,7 +490,8 @@ void mdaBeatBox::processReplacing(float **inputs, float **outputs, int32_t sampl case 3: if(recpos<kl) *(kbuf + recpos++) = e; else e=0.f; break; case 4: if(recpos<sl) { *(sbuf+recpos)=a; *(sbuf2+recpos)=b; recpos++; } - else e=0.f; break; + else e=0.f; + break; } } *++out1 = e; diff --git a/src/mdaCombo.cpp b/src/mdaCombo.cpp index 559c7ff..9d85235 100644 --- a/src/mdaCombo.cpp +++ b/src/mdaCombo.cpp @@ -244,7 +244,8 @@ void mdaCombo::getParameterDisplay(int32_t index, char *text) case 2: int2strng((int32_t)(200 * fParam3 - 100), text); break; case 3: int2strng((int32_t)(40 * fParam4 - 20), text); break; case 4: if(fParam5>0.0) strcpy(text, "STEREO"); - else strcpy(text, "MONO"); break; + else strcpy(text, "MONO"); + break; case 5: int2strng((int32_t)(100 * fParam6), text); break; case 6: int2strng((int32_t)(100 * fParam7), text); break; } diff --git a/src/mdaDither.cpp b/src/mdaDither.cpp index 15daaaf..2108015 100644 --- a/src/mdaDither.cpp +++ b/src/mdaDither.cpp @@ -165,7 +165,8 @@ void mdaDither::getParameterDisplay(int32_t index, char *text) case 4: if(fParam4>0.1f) if(gain<0.0001f) strcpy(text, "-80"); else int2strng((int32_t)(20.0 * log10(gain)), text); - else strcpy(text, "OFF"); break; + else strcpy(text, "OFF"); + break; } } diff --git a/src/mdaDynamics.cpp b/src/mdaDynamics.cpp index 1743354..53651f9 100644 --- a/src/mdaDynamics.cpp +++ b/src/mdaDynamics.cpp @@ -176,9 +176,11 @@ void mdaDynamics::getParameterDisplay(int32_t index, char *text) case 3: int2strng((int32_t)(-301030.1 / (getSampleRate() * log10(1.0 - att))),text); break; case 4: int2strng((int32_t)(-301.0301 / (getSampleRate() * log10(1.0 - rel))),text); break; case 5: if(lthr==0.f) strcpy(text, "OFF"); - else int2strng((int32_t)(30.0*fParam6 - 20.0),text); break; + else int2strng((int32_t)(30.0*fParam6 - 20.0),text); + break; case 6: if(xthr==0.f) strcpy(text, "OFF"); - else int2strng((int32_t)(60.0*fParam7 - 60.0),text); break; + else int2strng((int32_t)(60.0*fParam7 - 60.0),text); + break; case 7: int2strng((int32_t)(-301030.1 / (getSampleRate() * log10(1.0 - gatt))),text); break; case 8: int2strng((int32_t)(-1806.0 / (getSampleRate() * log10(xrat))),text); break; case 9: int2strng((int32_t)(100.0*fParam10),text); break; diff --git a/src/mdaEPiano.cpp b/src/mdaEPiano.cpp index 6443e7b..08d13b7 100644 --- a/src/mdaEPiano.cpp +++ b/src/mdaEPiano.cpp @@ -311,7 +311,8 @@ void mdaEPiano::getParameterDisplay(int32_t index, char *text) case 4: if(param[index] > 0.5f) sprintf(string, "Trem %.0f", 200.0f * param[index] - 100.0f); else - sprintf(string, "Pan %.0f", 100.0f - 200.0f * param[index]); break; + sprintf(string, "Pan %.0f", 100.0f - 200.0f * param[index]); + break; case 5: sprintf(string, "%.2f", (float)exp(6.22f * param[5] - 2.61f)); break; //LFO Hz case 7: sprintf(string, "%.0f", 200.0f * param[index]); break; diff --git a/src/mdaJX10.cpp b/src/mdaJX10.cpp index d327cd6..feff0e8 100644 --- a/src/mdaJX10.cpp +++ b/src/mdaJX10.cpp @@ -404,10 +404,12 @@ void mdaJX10::getParameterDisplay(int32_t index, char *text) case 8: case 23: sprintf(string, "%.1f", 200.0f * param[index] - 100.0f); break; case 10: if(param[index]<0.05f) strcpy(string, " OFF "); - else sprintf(string, "%.0f", 200.0f * param[index] - 100.0f); break; + else sprintf(string, "%.0f", 200.0f * param[index] - 100.0f); + break; case 19: sprintf(string, "%.3f", lfoHz); break; case 20: if(param[index]<0.5f) sprintf(string, "PWM %3.0f", 100.0f - 200.0f * param[index]); - else sprintf(string, "%7.0f", 200.0f * param[index] - 100.0f); break; + else sprintf(string, "%7.0f", 200.0f * param[index] - 100.0f); + break; case 22: sprintf(string, "%d", (int32_t)(param[index] * 4.9f) - 2); break; default: sprintf(string, "%.0f", 100.0f * param[index]); } diff --git a/src/mdaLimiter.cpp b/src/mdaLimiter.cpp index 2942196..6226612 100644 --- a/src/mdaLimiter.cpp +++ b/src/mdaLimiter.cpp @@ -146,7 +146,8 @@ void mdaLimiter::getParameterDisplay(int32_t index, char *text) case 3: int2strng((int32_t)(-301030.1 / (getSampleRate() * log10(1.0 - att))),text); break; case 2: int2strng((int32_t)(-301.0301 / (getSampleRate() * log10(1.0 - rel))),text); break; case 4: if(fParam5>0.0) strcpy(text, "SOFT"); - else strcpy(text, "HARD"); break; + else strcpy(text, "HARD"); + break; } } diff --git a/src/mdaLoudness.cpp b/src/mdaLoudness.cpp index 7ef3b38..feceb7f 100644 --- a/src/mdaLoudness.cpp +++ b/src/mdaLoudness.cpp @@ -173,7 +173,8 @@ void mdaLoudness::getParameterDisplay(int32_t index, char *text) { case 0: sprintf(string, "%.1f", igain); break; case 2: if(programs[curProgram].param[index]>0.5f) strcpy (string, "ON"); - else strcpy (string, "OFF"); break; + else strcpy (string, "OFF"); + break; default: sprintf(string, "%.1f", ogain); break; } string[8] = 0; diff --git a/src/mdaMultiBand.cpp b/src/mdaMultiBand.cpp index 44f702f..000c7a5 100644 --- a/src/mdaMultiBand.cpp +++ b/src/mdaMultiBand.cpp @@ -244,7 +244,8 @@ void mdaMultiBand::getParameterDisplay(int32_t index, char *text) case 10: int2strng((int32_t)(-301.0301 / (getSampleRate() * log10(1.0 - rel2))),text); break; case 11: int2strng((int32_t)(200.0 * fParam12), text); break; case 12: if(mswap) strcpy(text, "S"); - else strcpy(text, "M"); break; + else strcpy(text, "M"); + break; } } diff --git a/src/mdaRePsycho.cpp b/src/mdaRePsycho.cpp index 370696e..b56f404 100644 --- a/src/mdaRePsycho.cpp +++ b/src/mdaRePsycho.cpp @@ -170,7 +170,8 @@ void mdaRePsycho::getParameterDisplay(int32_t index, char *text) case 4: long2string((long)(1000.0 * dtim / getSampleRate()), text); break; case 1: long2string((long)(int(99.0 * fParam6) - 99.0), text); break; case 6: if(fParam7>0.0) strcpy(text, "HIGH"); - else strcpy(text, "LOW"); break; + else strcpy(text, "LOW"); + break; } } diff --git a/src/mdaRezFilter.cpp b/src/mdaRezFilter.cpp index 744696b..13d25d3 100644 --- a/src/mdaRezFilter.cpp +++ b/src/mdaRezFilter.cpp @@ -184,7 +184,8 @@ void mdaRezFilter::getParameterDisplay(int32_t index, char *text) case 6: int2strng((int32_t)(200 * fParam6 - 100), text); break; case 7: float2strng((float)pow(10.0f, 4.f*fParam7 - 2.f), text); break; case 8: if(tthr==0.f) strcpy(text, "FREE RUN"); - else int2strng((int32_t)(20*log10(0.5*tthr)), text); break; + else int2strng((int32_t)(20*log10(0.5*tthr)), text); + break; case 9: int2strng((int32_t)(100 * fParam9), text); break; } } diff --git a/src/mdaStereo.cpp b/src/mdaStereo.cpp index 40eb93b..d97584a 100644 --- a/src/mdaStereo.cpp +++ b/src/mdaStereo.cpp @@ -204,7 +204,8 @@ void mdaStereo::getParameterDisplay(int32_t index, char *text) case 1: float2strng((float)(1000.0 * fdel / getSampleRate()), text); break; case 2: int2strng((int32_t)(200.0 * (fParam3 - 0.5)), text); break; case 3: if(mod>0.f) float2strng((float)(1000.0 * mod / getSampleRate()), text); - else strcpy(text, "OFF"); break; + else strcpy(text, "OFF"); + break; case 4: float2strng((float)pow(10.0,2.0 - 3.0 * fParam5), text); break; } } diff --git a/src/mdaTestTone.cpp b/src/mdaTestTone.cpp index e2f736c..f87184e 100644 --- a/src/mdaTestTone.cpp +++ b/src/mdaTestTone.cpp @@ -246,7 +246,7 @@ void mdaTestTone::midi2string(float n, char *text) nn = int(n); if(nn>99) t[p++] = 48 + (int(0.01*n)%10); if(nn>9) t[p++] = 48 + (int(0.10*n)%10); - t[p++] = 48 + (int(n)%10); + if(1) t[p++] = 48 + (int(n)%10); t[p++] = ' '; o = int(nn/12.f); s = nn-(12*o); o -= 2; @@ -367,11 +367,13 @@ void mdaTestTone::getParameterDisplay(int32_t index, char *text) case 2: if(fParam2>0.3f) { if(fParam2>0.7f) strcpy(text, "RIGHT"); else strcpy(text, "CENTRE"); } - else strcpy(text, "LEFT"); break; + else strcpy(text, "LEFT"); + break; case 3: strcpy(text, disp1); break; case 4: strcpy(text, disp2); break; case 6: if(fParam5==0) strcpy(text, "OFF"); - else int2strng((int32_t)(40 * fParam5 - 40), text); break; + else int2strng((int32_t)(40 * fParam5 - 40), text); + break; case 5: int2strng(1000 + 500*int(62*fParam6), text); break; case 7: float2strng(cal, text); break; } diff --git a/src/mdaThruZero.cpp b/src/mdaThruZero.cpp index a7bd16b..be6fa34 100644 --- a/src/mdaThruZero.cpp +++ b/src/mdaThruZero.cpp @@ -161,7 +161,8 @@ void mdaThruZero::getParameterDisplay(int32_t index, char *text) switch(index) { case 0: if(param[0]<0.01f) strcpy (string, "-"); - else sprintf(string, "%.2f", (float)pow(10.0f ,2.0f - 3.0f * param[index])); break; + else sprintf(string, "%.2f", (float)pow(10.0f ,2.0f - 3.0f * param[index])); + break; case 1: sprintf(string, "%.2f", 1000.f * dep / getSampleRate()); break; case 3: sprintf(string, "%.0f", 200.0f * param[index] - 100.0f); break; default: sprintf(string, "%.0f", 100.0f * param[index]); diff --git a/src/mdaVocInput.cpp b/src/mdaVocInput.cpp index 1ffbe0c..ab02b3c 100644 --- a/src/mdaVocInput.cpp +++ b/src/mdaVocInput.cpp @@ -145,7 +145,8 @@ void mdaVocInput::getParameterDisplay(int32_t index, char *text) case 2: strcpy(string, "QUANT"); } break; case 1: if(track) sprintf(string, "%d", (int32_t)(48.0f * param[1] - 24.0f)); - else midi2string((int32_t)(48.0f * param[1] + 21.0f), string); break; + else midi2string((int32_t)(48.0f * param[1] + 21.0f), string); + break; case 4: midi2string((int32_t)(48.0f * param[4] + 45.0f), string); break; diff --git a/src/mdaVocoder.cpp b/src/mdaVocoder.cpp index bbdb1a2..c5a54aa 100644 --- a/src/mdaVocoder.cpp +++ b/src/mdaVocoder.cpp @@ -224,7 +224,8 @@ void mdaVocoder::getParameterDisplay(int32_t index, char *text) case 0: if(swap) strcpy(string, "RIGHT"); else strcpy(string, "LEFT"); break; case 1: sprintf(string, "%.1f", 40.0f * param[index] - 20.0f); break; case 4: if(param[index]<0.05f) strcpy(string, "FREEZE"); - else sprintf(string, "%.1f", (float)pow(10.0f, 1.0f + 3.0f * param[index])); break; + else sprintf(string, "%.1f", (float)pow(10.0f, 1.0f + 3.0f * param[index])); + break; case 6: sprintf(string, "%.0f", 800.0f * (float)pow(2.0f, 3.0f * param[index] - 2.0f)); break; case 7: if(nbnd==8) strcpy(string, "8 BAND"); else strcpy(string, "16 BAND"); break; |