From: Guenter Roeck <linux@roeck-us.net>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: rydberg@bitmath.org, jdelvare@suse.de, lm-sensors@lm-sensors.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon/applesmc: Fix uninitialized variables warnings
Date: Thu, 5 Nov 2015 16:45:02 -0800 [thread overview]
Message-ID: <20151106004502.GB32106@roeck-us.net> (raw)
In-Reply-To: <1446763167-7716-1-git-send-email-shuahkh@osg.samsung.com>
On Thu, Nov 05, 2015 at 03:39:27PM -0700, Shuah Khan wrote:
> Fix the following "maybe used uninitialized" warnings by
> initializing the variables to keep the compiler quiet.
> There is no "used uninitialized" in this case.
>
> CC [M] drivers/hwmon/applesmc.o
> drivers/hwmon/applesmc.c: In function ‘applesmc_init_smcreg’:
> drivers/hwmon/applesmc.c:595:43: warning: ‘right_light_sensor’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
> s->num_light_sensors = left_light_sensor + right_light_sensor;
> ^
> drivers/hwmon/applesmc.c:540:26: note: ‘right_light_sensor’ was
> declared here
> bool left_light_sensor, right_light_sensor;
> ^
> drivers/hwmon/applesmc.c:595:43: warning: ‘left_light_sensor’ may
> be used uninitialized in this function [-Wmaybe-uninitialized]
> s->num_light_sensors = left_light_sensor + right_light_sensor;
> ^
> drivers/hwmon/applesmc.c:540:7: note: ‘left_light_sensor’ was
> declared here
> bool left_light_sensor, right_light_sensor;
> ^
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Applied.
Thanks,
Guenter
prev parent reply other threads:[~2015-11-06 0:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 22:39 Shuah Khan
2015-11-06 0:45 ` Guenter Roeck [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=20151106004502.GB32106@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=rydberg@bitmath.org \
--cc=shuahkh@osg.samsung.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
all inboxes | Powered by JetHome®