From nobody Wed Dec 17 09:18:17 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697184713; cv=none; d=zohomail.com; s=zohoarc; b=BkR9vGtC0HQsvujQmqozuwICvkXuLTlR/VCWBJd6sbwi/UyNxPBCjSZN+25bxVHhQfQ9xgJQ6K/vQwWAhrQkN8DpuN1hkO7ifkrOC5d1USotcgLqBp+fN+5yCHlOL44O+o0ylI/gRKdVa99duWEgXrXlnfMQCv6nw0K9+cWGc6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697184713; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VKQKRFN28e3kmjOkBArdYuYESMT4wctP/PohXvBXbu8=; b=aQLQQQuoNBax0c8F4+J6kAWhvAfAWEhoRu4+3KH4Ih8Drz82GdcKmr4UUHwGAoPBduREYGmy9tqYi7tiKPwNzF1NF7G4AbYXfFZ6TKpqFeppbXGjfcU5dSLYnvDZfcUWdkoAh3yW3wkBhKwGndlRJSd2offb8zb0/QMId7fhJNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697184713824164.97217055291082; Fri, 13 Oct 2023 01:11:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrD45-0000P9-4H; Fri, 13 Oct 2023 03:58:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrD41-00009O-Fi for qemu-devel@nongnu.org; Fri, 13 Oct 2023 03:58:29 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrD3z-0006qP-K3 for qemu-devel@nongnu.org; Fri, 13 Oct 2023 03:58:29 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4066241289bso19100355e9.0 for ; Fri, 13 Oct 2023 00:58:27 -0700 (PDT) Received: from localhost.localdomain (adsl-26.37.6.0.tellas.gr. [37.6.0.26]) by smtp.gmail.com with ESMTPSA id a10-20020a05600c224a00b003fe23b10fdfsm1798183wmm.36.2023.10.13.00.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 00:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697183906; x=1697788706; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VKQKRFN28e3kmjOkBArdYuYESMT4wctP/PohXvBXbu8=; b=kSA2q1npH//sBVba2yoCvv+L4iwI97xtn0H9YrsivLVNQy/4JHqzPZEJLXfqwUJb/v r5Jc8G2H4qgMXcPhmKUBvkWFosqzVMRTFziyMd3iIePCI90oSBvcJeIladQ908MyJJ1N 3ojqjC5IkngyH70UqPjaxmtExx2aXlFDBGYnK3fPGII1JtNpqwmw9gZbhyDUeibS2Fvb mEFU7Dw+OuvjXRlGlWknSaI+RdD7nQ77kT0cNWUIzYvKL8jOXRvcqheRQrPUBhtHmje3 DXnvTWl+BewfwgryP3g8uNHIVK0Xo1GOPc3mKhzt8gBIc5528BmTwTIuyDccIA9Qvxns eLBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697183906; x=1697788706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VKQKRFN28e3kmjOkBArdYuYESMT4wctP/PohXvBXbu8=; b=PwlD3paB2OQ27ibWxLXfHRIsLChhY+H1nqT4sRXN2J7nQoBeoCWq/dEytuHI90W1Np JS/g7CO986RLx9EkxPMDAh1yxSgvOHLcCrczpoc2TPcIIQvde6/I1Jij8wxADJVOsLTJ dVK3T7brk83KaxSPxKCUPg1DzufORpXMOt2yU/rDxudtbPCSwjxfMGo5n7Olee1mTRpa NhyN1gOKhRSewISvaoQ6nY79QrrWeMw5tdHV3dxdjPjz+m8xsZQ3yIbz5f1ujnD0UJNS zN0ky0UbhN+krA9tikwLLPDA+2y6UPN8zxH0qGkEbHcCVEkMBk8i9jJeQKVoRB15HUuo eApA== X-Gm-Message-State: AOJu0Yw7ivu2Y4QbdWRQW88DCwSz+B6xmELJ1CSyTWZh1FkN6648EpwI 02INvFyuVL3ilddCvM21qpss3dwEdDBHIc2b6wY= X-Google-Smtp-Source: AGHT+IFIUQ1I09Lo8hqxzjI72HuxQmmLBhdn4Y3CEB9m1aWGtSgkxYgJ59cWPboVG2KR0WFIVvBQZQ== X-Received: by 2002:a05:600c:2054:b0:402:906:1e87 with SMTP id p20-20020a05600c205400b0040209061e87mr21952696wmg.31.1697183905829; Fri, 13 Oct 2023 00:58:25 -0700 (PDT) From: Emmanouil Pitsidianakis To: qemu-devel@nongnu.org Cc: Emmanouil Pitsidianakis , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Christian Schoenebeck Subject: [RFC PATCH v2 16/78] audio: add fallthrough pseudo-keyword Date: Fri, 13 Oct 2023 10:56:43 +0300 Message-Id: <9f8879f961e38a2adfd205129beb94788de64c2e.1697183699.git.manos.pitsidianakis@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697184714373100001 Content-Type: text/plain; charset="utf-8" In preparation of raising -Wimplicit-fallthrough to 5, replace all fall-through comments with the fallthrough attribute pseudo-keyword. Signed-off-by: Emmanouil Pitsidianakis --- 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 @@ -245,39 +245,39 @@ static int audio_validate_settings (struct audsetting= s *as) static int audio_pcm_info_eq (struct audio_pcm_info *info, struct audsetti= ngs *as) { int bits =3D 8; bool is_signed =3D false, is_float =3D false; =20 switch (as->fmt) { case AUDIO_FORMAT_S8: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U8: break; =20 case AUDIO_FORMAT_S16: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U16: bits =3D 16; break; =20 case AUDIO_FORMAT_F32: is_float =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_S32: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U32: bits =3D 32; break; =20 default: abort(); } return info->freq =3D=3D as->freq && info->nchannels =3D=3D as->nchannels && info->is_signed =3D=3D is_signed && info->is_float =3D=3D is_float && info->bits =3D=3D bits && info->swap_endianness =3D=3D (as->endianness !=3D AUDIO_HOST_EN= DIANNESS); } @@ -285,45 +285,45 @@ static int audio_pcm_info_eq (struct audio_pcm_info *= info, struct audsettings *a void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings = *as) { int bits =3D 8, mul; bool is_signed =3D false, is_float =3D false; =20 switch (as->fmt) { case AUDIO_FORMAT_S8: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U8: mul =3D 1; break; =20 case AUDIO_FORMAT_S16: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U16: bits =3D 16; mul =3D 2; break; =20 case AUDIO_FORMAT_F32: is_float =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_S32: is_signed =3D true; - /* fall through */ + fallthrough; case AUDIO_FORMAT_U32: bits =3D 32; mul =3D 4; break; =20 default: abort(); } =20 info->freq =3D as->freq; info->bits =3D bits; info->is_signed =3D is_signed; info->is_float =3D is_float; info->nchannels =3D as->nchannels; info->bytes_per_frame =3D as->nchannels * mul; info->bytes_per_second =3D info->freq * info->bytes_per_frame; info->swap_endianness =3D (as->endianness !=3D AUDIO_HOST_ENDIANNESS); } diff --git a/audio/jackaudio.c b/audio/jackaudio.c index 974a3caad3..fc602411cd 100644 --- a/audio/jackaudio.c +++ b/audio/jackaudio.c @@ -574,22 +574,22 @@ static int qjack_init_in(HWVoiceIn *hw, struct audset= tings *as, static void qjack_client_fini_locked(QJackClient *c) { switch (c->state) { case QJACK_STATE_RUNNING: jack_deactivate(c->client); - /* fallthrough */ + fallthrough; =20 case QJACK_STATE_SHUTDOWN: jack_client_close(c->client); c->client =3D NULL; =20 qjack_buffer_free(&c->fifo); g_free(c->port); g_free(c->process_buffers); =20 c->state =3D QJACK_STATE_DISCONNECTED; - /* fallthrough */ + fallthrough; =20 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 @@ -487,31 +487,31 @@ static void qpw_set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNE= LS]) { memcpy(position, (uint32_t[SPA_AUDIO_MAX_CHANNELS]) { SPA_AUDIO_CHANNE= L_UNKNOWN, }, sizeof(uint32_t) * SPA_AUDIO_MAX_CHANNELS); /* * TODO: This currently expects the only frontend supporting more than= 2 * channels is the usb-audio. We will need some means to set channel * order when a new frontend gains multi-channel support. */ switch (channels) { case 8: position[6] =3D SPA_AUDIO_CHANNEL_SL; position[7] =3D SPA_AUDIO_CHANNEL_SR; - /* fallthrough */ + fallthrough; case 6: position[2] =3D SPA_AUDIO_CHANNEL_FC; position[3] =3D SPA_AUDIO_CHANNEL_LFE; position[4] =3D SPA_AUDIO_CHANNEL_RL; position[5] =3D SPA_AUDIO_CHANNEL_RR; - /* fallthrough */ + fallthrough; case 2: position[0] =3D SPA_AUDIO_CHANNEL_FL; position[1] =3D SPA_AUDIO_CHANNEL_FR; break; case 1: position[0] =3D SPA_AUDIO_CHANNEL_MONO; break; default: dolog("Internal error: unsupported channel count %d\n", channels); } } --=20 2.39.2