Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1263664
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] hwmon/applesmc: Fix uninitialized variables warnings |
| Date | 2015-11-06 01:50 +0100 |
| Message-ID | <qrDo6-5L5-9@gated-at.bofh.it> (permalink) |
| References | <qrBvY-4rq-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] hwmon/applesmc: Fix uninitialized variables warnings Shuah Khan <shuahkh@osg.samsung.com> - 2015-11-05 23:50 +0100 Re: [PATCH] hwmon/applesmc: Fix uninitialized variables warnings Guenter Roeck <linux@roeck-us.net> - 2015-11-06 01:50 +0100
csiph-web