From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: William Hubbs <w.d.hubbs@gmail.com>,
Chris Brannon <chris@the-brannons.com>,
Kirk Reiser <kirk@reisers.ca>,
Nathan Chancellor <nathan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
speakup@linux-speakup.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] speakup: devsynth: remove c23 label
Date: Wed, 13 Mar 2024 11:40:14 +0100 [thread overview]
Message-ID: <20240313104014.thhiz2pektmqun4b@begin> (raw)
In-Reply-To: <20240313100413.875280-1-arnd@kernel.org>
Hello,
I have already sent a fix to greg.
("speakup: Fix warning for label at end of compound statement")
Samuel
Arnd Bergmann, le mer. 13 mars 2024 11:04:03 +0100, a ecrit:
> From: Arnd Bergmann <arnd@arndb.de>
>
> clang-16 and higher warn about a c23 C extension that is also a GNU extension:
>
> drivers/accessibility/speakup/devsynth.c:111:3: error: label at end of compound statement is a C23 extension [-Werror,-Wc23-extensions]
>
> clang-15 just produces an error here:
>
> drivers/accessibility/speakup/devsynth.c:111:3: error: expected statement
>
> This is apparently the only such warning in the kernel tree at the moment,
> so just convert it into standard C code using the equivalent 'continue'
> keyword.
>
> Fixes: 807977260ae4 ("speakup: Add /dev/synthu device")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/accessibility/speakup/devsynth.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/accessibility/speakup/devsynth.c b/drivers/accessibility/speakup/devsynth.c
> index da4d0f6aa5bf..76b5e942dc1b 100644
> --- a/drivers/accessibility/speakup/devsynth.c
> +++ b/drivers/accessibility/speakup/devsynth.c
> @@ -68,7 +68,7 @@ static ssize_t speakup_file_writeu(struct file *fp, const char __user *buffer,
> case 7: /* 0xfe */
> case 1: /* 0x80 */
> /* Invalid, drop */
> - goto drop;
> + continue;
>
> case 0:
> /* ASCII, copy */
> @@ -96,7 +96,7 @@ static ssize_t speakup_file_writeu(struct file *fp, const char __user *buffer,
> if ((c & 0xc0) != 0x80) {
> /* Invalid, drop the head */
> want = 1;
> - goto drop;
> + continue;
> }
> value = (value << 6) | (c & 0x3f);
> in++;
> @@ -107,7 +107,6 @@ static ssize_t speakup_file_writeu(struct file *fp, const char __user *buffer,
> want = 1;
> break;
> }
> -drop:
> }
>
> count -= bytes;
> --
> 2.39.2
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
prev parent reply other threads:[~2024-03-13 10:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 10:04 [PATCH] speakup: devsynth: remove c23 label Arnd Bergmann
2024-03-13 10:40 ` Samuel Thibault [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240313104014.thhiz2pektmqun4b@begin \
--to=samuel.thibault@ens-lyon.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chris@the-brannons.com \
--cc=gregkh@linuxfoundation.org \
--cc=justinstitt@google.com \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=speakup@linux-speakup.org \
--cc=w.d.hubbs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox