Fix GCC 7 case fall through warnings
[flac.git] / src / libFLAC / lpc.c
index a624c93..0673895 100644 (file)
@@ -486,25 +486,25 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 * flac_r
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
-                               case 32: sum += qlp_coeff[31] * data[i-32];
-                               case 31: sum += qlp_coeff[30] * data[i-31];
-                               case 30: sum += qlp_coeff[29] * data[i-30];
-                               case 29: sum += qlp_coeff[28] * data[i-29];
-                               case 28: sum += qlp_coeff[27] * data[i-28];
-                               case 27: sum += qlp_coeff[26] * data[i-27];
-                               case 26: sum += qlp_coeff[25] * data[i-26];
-                               case 25: sum += qlp_coeff[24] * data[i-25];
-                               case 24: sum += qlp_coeff[23] * data[i-24];
-                               case 23: sum += qlp_coeff[22] * data[i-23];
-                               case 22: sum += qlp_coeff[21] * data[i-22];
-                               case 21: sum += qlp_coeff[20] * data[i-21];
-                               case 20: sum += qlp_coeff[19] * data[i-20];
-                               case 19: sum += qlp_coeff[18] * data[i-19];
-                               case 18: sum += qlp_coeff[17] * data[i-18];
-                               case 17: sum += qlp_coeff[16] * data[i-17];
-                               case 16: sum += qlp_coeff[15] * data[i-16];
-                               case 15: sum += qlp_coeff[14] * data[i-15];
-                               case 14: sum += qlp_coeff[13] * data[i-14];
+                               case 32: sum += qlp_coeff[31] * data[i-32]; /* Falls through. */
+                               case 31: sum += qlp_coeff[30] * data[i-31]; /* Falls through. */
+                               case 30: sum += qlp_coeff[29] * data[i-30]; /* Falls through. */
+                               case 29: sum += qlp_coeff[28] * data[i-29]; /* Falls through. */
+                               case 28: sum += qlp_coeff[27] * data[i-28]; /* Falls through. */
+                               case 27: sum += qlp_coeff[26] * data[i-27]; /* Falls through. */
+                               case 26: sum += qlp_coeff[25] * data[i-26]; /* Falls through. */
+                               case 25: sum += qlp_coeff[24] * data[i-25]; /* Falls through. */
+                               case 24: sum += qlp_coeff[23] * data[i-24]; /* Falls through. */
+                               case 23: sum += qlp_coeff[22] * data[i-23]; /* Falls through. */
+                               case 22: sum += qlp_coeff[21] * data[i-22]; /* Falls through. */
+                               case 21: sum += qlp_coeff[20] * data[i-21]; /* Falls through. */
+                               case 20: sum += qlp_coeff[19] * data[i-20]; /* Falls through. */
+                               case 19: sum += qlp_coeff[18] * data[i-19]; /* Falls through. */
+                               case 18: sum += qlp_coeff[17] * data[i-18]; /* Falls through. */
+                               case 17: sum += qlp_coeff[16] * data[i-17]; /* Falls through. */
+                               case 16: sum += qlp_coeff[15] * data[i-16]; /* Falls through. */
+                               case 15: sum += qlp_coeff[14] * data[i-15]; /* Falls through. */
+                               case 14: sum += qlp_coeff[13] * data[i-14]; /* Falls through. */
                                case 13: sum += qlp_coeff[12] * data[i-13];
                                         sum += qlp_coeff[11] * data[i-12];
                                         sum += qlp_coeff[10] * data[i-11];
                                case 13: sum += qlp_coeff[12] * data[i-13];
                                         sum += qlp_coeff[11] * data[i-12];
                                         sum += qlp_coeff[10] * data[i-11];
@@ -740,25 +740,25 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 * f
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
-                               case 32: sum += qlp_coeff[31] * (FLAC__int64)data[i-32];
-                               case 31: sum += qlp_coeff[30] * (FLAC__int64)data[i-31];
-                               case 30: sum += qlp_coeff[29] * (FLAC__int64)data[i-30];
-                               case 29: sum += qlp_coeff[28] * (FLAC__int64)data[i-29];
-                               case 28: sum += qlp_coeff[27] * (FLAC__int64)data[i-28];
-                               case 27: sum += qlp_coeff[26] * (FLAC__int64)data[i-27];
-                               case 26: sum += qlp_coeff[25] * (FLAC__int64)data[i-26];
-                               case 25: sum += qlp_coeff[24] * (FLAC__int64)data[i-25];
-                               case 24: sum += qlp_coeff[23] * (FLAC__int64)data[i-24];
-                               case 23: sum += qlp_coeff[22] * (FLAC__int64)data[i-23];
-                               case 22: sum += qlp_coeff[21] * (FLAC__int64)data[i-22];
-                               case 21: sum += qlp_coeff[20] * (FLAC__int64)data[i-21];
-                               case 20: sum += qlp_coeff[19] * (FLAC__int64)data[i-20];
-                               case 19: sum += qlp_coeff[18] * (FLAC__int64)data[i-19];
-                               case 18: sum += qlp_coeff[17] * (FLAC__int64)data[i-18];
-                               case 17: sum += qlp_coeff[16] * (FLAC__int64)data[i-17];
-                               case 16: sum += qlp_coeff[15] * (FLAC__int64)data[i-16];
-                               case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15];
-                               case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14];
+                               case 32: sum += qlp_coeff[31] * (FLAC__int64)data[i-32]; /* Falls through. */
+                               case 31: sum += qlp_coeff[30] * (FLAC__int64)data[i-31]; /* Falls through. */
+                               case 30: sum += qlp_coeff[29] * (FLAC__int64)data[i-30]; /* Falls through. */
+                               case 29: sum += qlp_coeff[28] * (FLAC__int64)data[i-29]; /* Falls through. */
+                               case 28: sum += qlp_coeff[27] * (FLAC__int64)data[i-28]; /* Falls through. */
+                               case 27: sum += qlp_coeff[26] * (FLAC__int64)data[i-27]; /* Falls through. */
+                               case 26: sum += qlp_coeff[25] * (FLAC__int64)data[i-26]; /* Falls through. */
+                               case 25: sum += qlp_coeff[24] * (FLAC__int64)data[i-25]; /* Falls through. */
+                               case 24: sum += qlp_coeff[23] * (FLAC__int64)data[i-24]; /* Falls through. */
+                               case 23: sum += qlp_coeff[22] * (FLAC__int64)data[i-23]; /* Falls through. */
+                               case 22: sum += qlp_coeff[21] * (FLAC__int64)data[i-22]; /* Falls through. */
+                               case 21: sum += qlp_coeff[20] * (FLAC__int64)data[i-21]; /* Falls through. */
+                               case 20: sum += qlp_coeff[19] * (FLAC__int64)data[i-20]; /* Falls through. */
+                               case 19: sum += qlp_coeff[18] * (FLAC__int64)data[i-19]; /* Falls through. */
+                               case 18: sum += qlp_coeff[17] * (FLAC__int64)data[i-18]; /* Falls through. */
+                               case 17: sum += qlp_coeff[16] * (FLAC__int64)data[i-17]; /* Falls through. */
+                               case 16: sum += qlp_coeff[15] * (FLAC__int64)data[i-16]; /* Falls through. */
+                               case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15]; /* Falls through. */
+                               case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14]; /* Falls through. */
                                case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13];
                                         sum += qlp_coeff[11] * (FLAC__int64)data[i-12];
                                         sum += qlp_coeff[10] * (FLAC__int64)data[i-11];
                                case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13];
                                         sum += qlp_coeff[11] * (FLAC__int64)data[i-12];
                                         sum += qlp_coeff[10] * (FLAC__int64)data[i-11];
@@ -1003,25 +1003,25 @@ void FLAC__lpc_restore_signal(const FLAC__int32 * flac_restrict residual, uint32
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
-                               case 32: sum += qlp_coeff[31] * data[i-32];
-                               case 31: sum += qlp_coeff[30] * data[i-31];
-                               case 30: sum += qlp_coeff[29] * data[i-30];
-                               case 29: sum += qlp_coeff[28] * data[i-29];
-                               case 28: sum += qlp_coeff[27] * data[i-28];
-                               case 27: sum += qlp_coeff[26] * data[i-27];
-                               case 26: sum += qlp_coeff[25] * data[i-26];
-                               case 25: sum += qlp_coeff[24] * data[i-25];
-                               case 24: sum += qlp_coeff[23] * data[i-24];
-                               case 23: sum += qlp_coeff[22] * data[i-23];
-                               case 22: sum += qlp_coeff[21] * data[i-22];
-                               case 21: sum += qlp_coeff[20] * data[i-21];
-                               case 20: sum += qlp_coeff[19] * data[i-20];
-                               case 19: sum += qlp_coeff[18] * data[i-19];
-                               case 18: sum += qlp_coeff[17] * data[i-18];
-                               case 17: sum += qlp_coeff[16] * data[i-17];
-                               case 16: sum += qlp_coeff[15] * data[i-16];
-                               case 15: sum += qlp_coeff[14] * data[i-15];
-                               case 14: sum += qlp_coeff[13] * data[i-14];
+                               case 32: sum += qlp_coeff[31] * data[i-32]; /* Falls through. */
+                               case 31: sum += qlp_coeff[30] * data[i-31]; /* Falls through. */
+                               case 30: sum += qlp_coeff[29] * data[i-30]; /* Falls through. */
+                               case 29: sum += qlp_coeff[28] * data[i-29]; /* Falls through. */
+                               case 28: sum += qlp_coeff[27] * data[i-28]; /* Falls through. */
+                               case 27: sum += qlp_coeff[26] * data[i-27]; /* Falls through. */
+                               case 26: sum += qlp_coeff[25] * data[i-26]; /* Falls through. */
+                               case 25: sum += qlp_coeff[24] * data[i-25]; /* Falls through. */
+                               case 24: sum += qlp_coeff[23] * data[i-24]; /* Falls through. */
+                               case 23: sum += qlp_coeff[22] * data[i-23]; /* Falls through. */
+                               case 22: sum += qlp_coeff[21] * data[i-22]; /* Falls through. */
+                               case 21: sum += qlp_coeff[20] * data[i-21]; /* Falls through. */
+                               case 20: sum += qlp_coeff[19] * data[i-20]; /* Falls through. */
+                               case 19: sum += qlp_coeff[18] * data[i-19]; /* Falls through. */
+                               case 18: sum += qlp_coeff[17] * data[i-18]; /* Falls through. */
+                               case 17: sum += qlp_coeff[16] * data[i-17]; /* Falls through. */
+                               case 16: sum += qlp_coeff[15] * data[i-16]; /* Falls through. */
+                               case 15: sum += qlp_coeff[14] * data[i-15]; /* Falls through. */
+                               case 14: sum += qlp_coeff[13] * data[i-14]; /* Falls through. */
                                case 13: sum += qlp_coeff[12] * data[i-13];
                                         sum += qlp_coeff[11] * data[i-12];
                                         sum += qlp_coeff[10] * data[i-11];
                                case 13: sum += qlp_coeff[12] * data[i-13];
                                         sum += qlp_coeff[11] * data[i-12];
                                         sum += qlp_coeff[10] * data[i-11];
@@ -1257,25 +1257,25 @@ void FLAC__lpc_restore_signal_wide(const FLAC__int32 * flac_restrict residual, u
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
                for(i = 0; i < (int)data_len; i++) {
                        sum = 0;
                        switch(order) {
-                               case 32: sum += qlp_coeff[31] * (FLAC__int64)data[i-32];
-                               case 31: sum += qlp_coeff[30] * (FLAC__int64)data[i-31];
-                               case 30: sum += qlp_coeff[29] * (FLAC__int64)data[i-30];
-                               case 29: sum += qlp_coeff[28] * (FLAC__int64)data[i-29];
-                               case 28: sum += qlp_coeff[27] * (FLAC__int64)data[i-28];
-                               case 27: sum += qlp_coeff[26] * (FLAC__int64)data[i-27];
-                               case 26: sum += qlp_coeff[25] * (FLAC__int64)data[i-26];
-                               case 25: sum += qlp_coeff[24] * (FLAC__int64)data[i-25];
-                               case 24: sum += qlp_coeff[23] * (FLAC__int64)data[i-24];
-                               case 23: sum += qlp_coeff[22] * (FLAC__int64)data[i-23];
-                               case 22: sum += qlp_coeff[21] * (FLAC__int64)data[i-22];
-                               case 21: sum += qlp_coeff[20] * (FLAC__int64)data[i-21];
-                               case 20: sum += qlp_coeff[19] * (FLAC__int64)data[i-20];
-                               case 19: sum += qlp_coeff[18] * (FLAC__int64)data[i-19];
-                               case 18: sum += qlp_coeff[17] * (FLAC__int64)data[i-18];
-                               case 17: sum += qlp_coeff[16] * (FLAC__int64)data[i-17];
-                               case 16: sum += qlp_coeff[15] * (FLAC__int64)data[i-16];
-                               case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15];
-                               case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14];
+                               case 32: sum += qlp_coeff[31] * (FLAC__int64)data[i-32]; /* Falls through. */
+                               case 31: sum += qlp_coeff[30] * (FLAC__int64)data[i-31]; /* Falls through. */
+                               case 30: sum += qlp_coeff[29] * (FLAC__int64)data[i-30]; /* Falls through. */
+                               case 29: sum += qlp_coeff[28] * (FLAC__int64)data[i-29]; /* Falls through. */
+                               case 28: sum += qlp_coeff[27] * (FLAC__int64)data[i-28]; /* Falls through. */
+                               case 27: sum += qlp_coeff[26] * (FLAC__int64)data[i-27]; /* Falls through. */
+                               case 26: sum += qlp_coeff[25] * (FLAC__int64)data[i-26]; /* Falls through. */
+                               case 25: sum += qlp_coeff[24] * (FLAC__int64)data[i-25]; /* Falls through. */
+                               case 24: sum += qlp_coeff[23] * (FLAC__int64)data[i-24]; /* Falls through. */
+                               case 23: sum += qlp_coeff[22] * (FLAC__int64)data[i-23]; /* Falls through. */
+                               case 22: sum += qlp_coeff[21] * (FLAC__int64)data[i-22]; /* Falls through. */
+                               case 21: sum += qlp_coeff[20] * (FLAC__int64)data[i-21]; /* Falls through. */
+                               case 20: sum += qlp_coeff[19] * (FLAC__int64)data[i-20]; /* Falls through. */
+                               case 19: sum += qlp_coeff[18] * (FLAC__int64)data[i-19]; /* Falls through. */
+                               case 18: sum += qlp_coeff[17] * (FLAC__int64)data[i-18]; /* Falls through. */
+                               case 17: sum += qlp_coeff[16] * (FLAC__int64)data[i-17]; /* Falls through. */
+                               case 16: sum += qlp_coeff[15] * (FLAC__int64)data[i-16]; /* Falls through. */
+                               case 15: sum += qlp_coeff[14] * (FLAC__int64)data[i-15]; /* Falls through. */
+                               case 14: sum += qlp_coeff[13] * (FLAC__int64)data[i-14]; /* Falls through. */
                                case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13];
                                         sum += qlp_coeff[11] * (FLAC__int64)data[i-12];
                                         sum += qlp_coeff[10] * (FLAC__int64)data[i-11];
                                case 13: sum += qlp_coeff[12] * (FLAC__int64)data[i-13];
                                         sum += qlp_coeff[11] * (FLAC__int64)data[i-12];
                                         sum += qlp_coeff[10] * (FLAC__int64)data[i-11];