[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v3 16/78] audio: add fallthrough pseudo-keyword
|
From: |
Emmanouil Pitsidianakis |
|
Subject: |
[RFC PATCH v3 16/78] audio: add fallthrough pseudo-keyword |
|
Date: |
Fri, 13 Oct 2023 11:45:44 +0300 |
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
audio/audio.c | 16 ++++++++--------
audio/jackaudio.c | 4 ++--
audio/pwaudio.c | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index e9815d6812..ed7c795af7 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -250,23 +250,23 @@ static int audio_pcm_info_eq (struct audio_pcm_info
*info, struct audsettings *a
switch (as->fmt) {
case AUDIO_FORMAT_S8:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U8:
break;
case AUDIO_FORMAT_S16:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U16:
bits = 16;
break;
case AUDIO_FORMAT_F32:
is_float = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_S32:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U32:
bits = 32;
break;
@@ -290,14 +290,14 @@ void audio_pcm_init_info (struct audio_pcm_info *info,
struct audsettings *as)
switch (as->fmt) {
case AUDIO_FORMAT_S8:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U8:
mul = 1;
break;
case AUDIO_FORMAT_S16:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U16:
bits = 16;
mul = 2;
@@ -305,10 +305,10 @@ void audio_pcm_init_info (struct audio_pcm_info *info,
struct audsettings *as)
case AUDIO_FORMAT_F32:
is_float = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_S32:
is_signed = true;
- /* fall through */
+ fallthrough;
case AUDIO_FORMAT_U32:
bits = 32;
mul = 4;
diff --git a/audio/jackaudio.c b/audio/jackaudio.c
index 974a3caad3..fc602411cd 100644
--- a/audio/jackaudio.c
+++ b/audio/jackaudio.c
@@ -576,7 +576,7 @@ static void qjack_client_fini_locked(QJackClient *c)
switch (c->state) {
case QJACK_STATE_RUNNING:
jack_deactivate(c->client);
- /* fallthrough */
+ fallthrough;
case QJACK_STATE_SHUTDOWN:
jack_client_close(c->client);
@@ -587,7 +587,7 @@ static void qjack_client_fini_locked(QJackClient *c)
g_free(c->process_buffers);
c->state = QJACK_STATE_DISCONNECTED;
- /* fallthrough */
+ fallthrough;
case QJACK_STATE_DISCONNECTED:
break;
diff --git a/audio/pwaudio.c b/audio/pwaudio.c
index bf26fadb06..89b31617a6 100644
--- a/audio/pwaudio.c
+++ b/audio/pwaudio.c
@@ -497,13 +497,13 @@ qpw_set_position(uint32_t channels, uint32_t
position[SPA_AUDIO_MAX_CHANNELS])
case 8:
position[6] = SPA_AUDIO_CHANNEL_SL;
position[7] = SPA_AUDIO_CHANNEL_SR;
- /* fallthrough */
+ fallthrough;
case 6:
position[2] = SPA_AUDIO_CHANNEL_FC;
position[3] = SPA_AUDIO_CHANNEL_LFE;
position[4] = SPA_AUDIO_CHANNEL_RL;
position[5] = SPA_AUDIO_CHANNEL_RR;
- /* fallthrough */
+ fallthrough;
case 2:
position[0] = SPA_AUDIO_CHANNEL_FL;
position[1] = SPA_AUDIO_CHANNEL_FR;
--
2.39.2
- [RFC PATCH v3 02/78] block: add fallthrough pseudo-keyword, (continued)
- [RFC PATCH v3 02/78] block: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 05/78] qobject/json: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 06/78] tcg: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 10/78] hw/ide/atapi.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 11/78] hw/timer: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 12/78] hw/usb: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 13/78] hw/adc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 09/78] hw/acpi/aml-build.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 16/78] audio: add fallthrough pseudo-keyword,
Emmanouil Pitsidianakis <=
- [RFC PATCH v3 17/78] ui/sdl2.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 20/78] target/mips: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 19/78] target/hppa: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 14/78] util/error-report.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 18/78] ui/win32-kbd-hook.c: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 15/78] accel/tcg: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 21/78] target/sparc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 26/78] target/s390x: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13
- [RFC PATCH v3 22/78] target/ppc: add fallthrough pseudo-keyword, Emmanouil Pitsidianakis, 2023/10/13