Commit b94e88bc authored by Borislav Petkov's avatar Borislav Petkov Committed by Matthew Garrett

hdaps: Shut up gcc uninitialized variable warnings

Turn off the following triggered with gcc 4.6.1 on Debian testing:

drivers/platform/x86/hdaps.c: In function ‘hdaps_temp2_show’:
drivers/platform/x86/hdaps.c:398:16: warning: ‘temp’ may be used uninitialized in this function [-Wuninitialized]
drivers/platform/x86/hdaps.c: In function ‘hdaps_temp1_show’:
drivers/platform/x86/hdaps.c:385:16: warning: ‘temp’ may be used uninitialized in this function [-Wuninitialized]

Cc: Frank Seidel <frank@f-seidel.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 2a748853
......@@ -375,7 +375,7 @@ static ssize_t hdaps_variance_show(struct device *dev,
static ssize_t hdaps_temp1_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
u8 temp;
u8 uninitialized_var(temp);
int ret;
ret = hdaps_readb_one(HDAPS_PORT_TEMP1, &temp);
......@@ -388,7 +388,7 @@ static ssize_t hdaps_temp1_show(struct device *dev,
static ssize_t hdaps_temp2_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
u8 temp;
u8 uninitialized_var(temp);
int ret;
ret = hdaps_readb_one(HDAPS_PORT_TEMP2, &temp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment