lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 25 May 2020 12:49:45 +0200
From:   Pavel Machek <pavel@....cz>
To:     Hongbo Yao <yaohongbo@...wei.com>
Cc:     jansimon.moeller@....de, jacek.anaszewski@...il.com,
        chenzhou10@...wei.com, linux-kernel@...r.kernel.org,
        linux-leds@...r.kernel.org
Subject: Re: [PATCH -next] leds: blinkm: remove set but not used variable

On Sat 2020-05-09 22:23:57, Hongbo Yao wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> drivers/leds/leds-blinkm.c:483:6: warning: variable ‘ret’ set
> but not used [-Wunused-but-set-variable]
>   int ret;

Should error be propagated?
								Pavel
								

> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Hongbo Yao <yaohongbo@...wei.com>
> ---
>  drivers/leds/leds-blinkm.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c
> index e11fe1788242..a493ee0e0fc7 100644
> --- a/drivers/leds/leds-blinkm.c
> +++ b/drivers/leds/leds-blinkm.c
> @@ -480,9 +480,8 @@ static int blinkm_led_blue_set(struct led_classdev *led_cdev,
>  
>  static void blinkm_init_hw(struct i2c_client *client)
>  {
> -	int ret;
> -	ret = blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
> -	ret = blinkm_transfer_hw(client, BLM_GO_RGB);
> +	blinkm_transfer_hw(client, BLM_STOP_SCRIPT);
> +	blinkm_transfer_hw(client, BLM_GO_RGB);
>  }
>  
>  static int blinkm_test_run(struct i2c_client *client)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ