From: Borislav Petkov Date: Thu, 24 Nov 2011 14:01:31 +0000 (+0100) Subject: hdaps: Shut up gcc uninitialized variable warnings X-Git-Tag: v3.4-rc1~63^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b94e88bcb35b321b55ff4517c10eeec16079d46f;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Cc: Matthew Garrett Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Borislav Petkov Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c index 5a34973..2fdacc2 100644 --- a/drivers/platform/x86/hdaps.c +++ b/drivers/platform/x86/hdaps.c @@ -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);