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:	Fri, 24 Apr 2015 13:10:17 +0200
From:	Karol Wrona <k.wrona@...sung.com>
To:	Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>,
	Karol Wrona <wrona.vy@...il.com>
Subject: Re: [PATCH] iio: common: ssp_sensors: Fix uninitialized warning for
 timestamp

On 04/18/2015 09:02 PM, Jonathan Cameron wrote:
> On 16/04/15 10:30, Karol Wrona wrote:
>> calculated_time variable caused warning as uninitialized.  It was not harmful
>> because it was evaluated in the path in which was used later but it is to
>> satisfy the checkers.
>>
>> Signed-off-by: Karol Wrona <k.wrona@...sung.com>
> Dumb compiler. It's a false positive and as the function is an inline in the header,
> it should be able to tell. 
> 
> What compiler is spitting out the warning?


You should have krobot complain in the mail.
Subject: "include/linux/iio/buffer.h:142:32: warning: 'calculated_time'
may be used uninitialized in this function"

This was sh compiler. I suppose that we can treat it as false warning.
It will complain whenever the variable will stay uninitialized even if
not used in such path.


> 
>> ---
>>  drivers/iio/common/ssp_sensors/ssp_iio.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/common/ssp_sensors/ssp_iio.c b/drivers/iio/common/ssp_sensors/ssp_iio.c
>> index a3ae165..16180e6 100644
>> --- a/drivers/iio/common/ssp_sensors/ssp_iio.c
>> +++ b/drivers/iio/common/ssp_sensors/ssp_iio.c
>> @@ -80,7 +80,7 @@ int ssp_common_process_data(struct iio_dev *indio_dev, void *buf,
>>  			    unsigned int len, int64_t timestamp)
>>  {
>>  	__le32 time;
>> -	int64_t calculated_time;
>> +	int64_t calculated_time = 0;
>>  	struct ssp_sensor_data *spd = iio_priv(indio_dev);
>>  
>>  	if (indio_dev->scan_bytes == 0)
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
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