public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Steven King <sfking@fdwdc.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][input] add Honeywell hmc5843 3-Axis Magnetometer (digital compass)  driver.
Date: Tue, 15 Dec 2009 16:23:03 +0200	[thread overview]
Message-ID: <20091215142303.GC24799@bicker> (raw)
In-Reply-To: <200912102250.12853.sfking@fdwdc.com>

On Thu, Dec 10, 2009 at 10:50:12PM -0800, Steven King wrote:
> +static void hmc5843_poll(struct input_polled_dev *ipdev)
> +{
> +	struct hmc5843 *hmc5843 = ipdev->private;
> +	int x, y, z;
> +

  CC      drivers/input/misc/hmc5843.o
drivers/input/misc/hmc5843.c: In function ‘hmc5843_poll’:
drivers/input/misc/hmc5843.c:312: warning: ‘x’ may be used uninitialized in this function
drivers/input/misc/hmc5843.c:312: warning: ‘y’ may be used uninitialized in this function
drivers/input/misc/hmc5843.c:312: warning: ‘z’ may be used uninitialized in this function


> +	mutex_lock(&hmc5843->lock);
> +	if (!hmc5843_read_xyz(hmc5843, &x, &y, &z)) {
> +		input_report_abs(ipdev->input, ABS_X, x);
> +		input_report_abs(ipdev->input, ABS_Y, y);
> +		input_report_abs(ipdev->input, ABS_Z, z);
> +		input_sync(ipdev->input);
> +	}
> +	mutex_unlock(&hmc5843->lock);
> +}
> +

Some versions of gcc may not complain, but could you suppress
the warnings anyway?

regards,
dan carpenter

      parent reply	other threads:[~2009-12-15 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11  6:50 [PATCH][input] add Honeywell hmc5843 3-Axis Magnetometer (digital compass) driver Steven King
2009-12-11 12:45 ` Jonathan Cameron
2009-12-11 22:26   ` Steven King
2009-12-15 14:23 ` Dan Carpenter [this message]

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=20091215142303.GC24799@bicker \
    --to=error27@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfking@fdwdc.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