Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754496AbbDRTCx (ORCPT ); Sat, 18 Apr 2015 15:02:53 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:33394 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754445AbbDRTCr (ORCPT ); Sat, 18 Apr 2015 15:02:47 -0400 Message-ID: <5532AA55.3040609@kernel.org> Date: Sat, 18 Apr 2015 20:02:45 +0100 From: Jonathan Cameron User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Karol Wrona , linux-iio@vger.kernel.org CC: linux-kernel@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Karol Wrona Subject: Re: [PATCH] iio: common: ssp_sensors: Fix uninitialized warning for timestamp References: <1429176624-19223-1-git-send-email-k.wrona@samsung.com> In-Reply-To: <1429176624-19223-1-git-send-email-k.wrona@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 35 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 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? > --- > 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/