speakup: devsynth: remove c23 label
PATCH 1/1 speakup: devsynth: remove c23 label
From: Arnd Bergmann <[email protected]>
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.
--- drivers/accessibility/speakup/devsynth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/accessibility/speakup/devsynth.c +2 -3
@@ -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;
Signature · 1 line
2.39.2
Samuel Thibault
maintainerHello,
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:
Quoted 53 lines
From: Arnd Bergmann <[email protected]>
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 statementThis 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 <[email protected]>--- drivers/accessibility/speakup/devsynth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/accessibility/speakup/devsynth.c +2
-3@@ -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;Signature · 1 line
2.39.2
Signature · 4 lines
Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.