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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 15:05:11 +0100
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Darshana Padmadas <darshanapadmadas@...il.com>
Cc:	outreachy-kernel@...glegroups.com, jic23@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [Outreachy kernel] [PATCH] iio: adc: Call uninitialized_var for
 raw_sample

On Thu, Mar 19, 2015 at 07:04:21PM +0530, Darshana Padmadas wrote:
> This patch calls uninitialized_var function for uninitialized
> variable raw_sample. This error was reported by the static
> analysis tool, cppcheck.
> 
> Signed-off-by: Darshana Padmadas <darshanapadmadas@...il.com>
> ---
>  drivers/iio/adc/ad_sigma_delta.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
> index d10bd0c..f0bbf3c 100644
> --- a/drivers/iio/adc/ad_sigma_delta.c
> +++ b/drivers/iio/adc/ad_sigma_delta.c
> @@ -248,7 +248,8 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
>  	const struct iio_chan_spec *chan, int *val)
>  {
>  	struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev);
> -	unsigned int sample, raw_sample;
> +	unsigned int sample;
> +	unsigned int uninitialized_var(raw_sample);

I don't understand, what exactly is this "fixing"?

And note, cppcheck is known to give you lots of false warnings / errors,
be very careful when using it.  Some kernel developers refuse to take
patches that mention it given that it has been wrong so many times in
the past.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ