Skip to content

Commit

Permalink
hdaps: Shut up gcc uninitialized variable warnings
Browse files Browse the repository at this point in the history
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: Borislav Petkov <bp@alien8.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Borislav Petkov authored and Matthew Garrett committed Mar 20, 2012
1 parent 2a74885 commit b94e88b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/x86/hdaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit b94e88b

Please sign in to comment.