public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Karol Wrona <k.wrona@samsung.com>, linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Karol Wrona <wrona.vy@gmail.com>
Subject: Re: [PATCH] iio: common: ssp_sensors: Fix uninitialized warning for timestamp
Date: Sat, 18 Apr 2015 20:02:45 +0100	[thread overview]
Message-ID: <5532AA55.3040609@kernel.org> (raw)
In-Reply-To: <1429176624-19223-1-git-send-email-k.wrona@samsung.com>

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@samsung.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?

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


  reply	other threads:[~2015-04-18 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16  9:30 [PATCH] iio: common: ssp_sensors: Fix uninitialized warning for timestamp Karol Wrona
2015-04-18 19:02 ` Jonathan Cameron [this message]
2015-04-24 11:10   ` Karol Wrona
2015-04-26 17:01     ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5532AA55.3040609@kernel.org \
    --to=jic23@kernel.org \
    --cc=k.wrona@samsung.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=wrona.vy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox