Skip to contentSkip to conversation

ALSA: sparc/dbri: add missing fallthrough

PATCH In review Rosen Penev 2 participants 2 messages May 6 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: sparc/dbri: add missing fallthrough

Fixes compiler error with probably newer compilers:

sound/sparc/dbri.c:595:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

  595 |         case 1:
      |         ^
sound/sparc/dbri.c:595:2: note: insert 'break;' to avoid fall-through
  595 |         case 1:
      |         ^
      |         break;
---
 sound/sparc/dbri.c | 1 +
 1 file changed, 1 insertion(+)
sound/sparc/dbri.c +1 -0
index 75f82a92ff44..2f5f62079fa4 100644
@@ -592,6 +592,7 @@ static __u32 reverse_bytes(__u32 b, int len)
 		fallthrough;
 	case 2:
 		b = ((b & 0xaaaaaaaa) >> 1) | ((b & 0x55555555) << 1);
+		fallthrough;
 	case 1:
 	case 0:
 		break;
Signature · 1 line
2.54.0
#1 lore raw
Quoted 4 lines · Rosen Penev

Fixes compiler error with probably newer compilers:

sound/sparc/dbri.c:595:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

Quoted 8 lines
  595 |         case 1:
      |         ^
sound/sparc/dbri.c:595:2: note: insert 'break;' to avoid fall-through
  595 |         case 1:
      |         ^
      |         break;

Applied now. Thanks.

Takashi