Re: [PATCH -next] speakup: Fix compilation error reported by old GCC in devsynth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gaosheng Cui, le lun. 18 mars 2024 22:36:39 +0800, a ecrit:
> GCC version: 9.4.0
> 
> devsynth.c: In function ‘speakup_file_writeu’:
> devsynth.c:110:1: error: label at end of compound statement
>   110 | drop:
>       | ^~~~
> 
> There is a compilation error reported by old GCC in devsynth,
> as above, fix it by moving the label.
> 
> Fixes: 807977260ae4 ("speakup: Add /dev/synthu device")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@xxxxxxxxxx>
> ---
>  drivers/accessibility/speakup/devsynth.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/accessibility/speakup/devsynth.c b/drivers/accessibility/speakup/devsynth.c
> index da4d0f6aa5bf..1544495bfbd9 100644
> --- a/drivers/accessibility/speakup/devsynth.c
> +++ b/drivers/accessibility/speakup/devsynth.c
> @@ -67,8 +67,8 @@ static ssize_t speakup_file_writeu(struct file *fp, const char __user *buffer,
>  			case 8: /* 0xff */
>  			case 7: /* 0xfe */
>  			case 1: /* 0x80 */
> -				/* Invalid, drop */
> -				goto drop;
> +				/* Invalid, drop and continue */
> +				continue;
>  
>  			case 0:
>  				/* ASCII, copy */
> @@ -105,9 +105,9 @@ static ssize_t speakup_file_writeu(struct file *fp, const char __user *buffer,
>  				if (value < 0x10000)
>  					ubuf[out++] = value;
>  				want = 1;
> +drop:

This label placement would be very confusing.

As I already mentioned, I have already sent a fix for this to Greg KH.

Samuel

>  				break;
>  			}
> -drop:
>  		}
>  
>  		count -= bytes;
> -- 
> 2.25.1




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]

  Powered by Linux