Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1195227 > unrolled thread

[PATCH] staging: wilc1000: host_interface.c: Fix build warning

Started byChandra S Gorentla <csgorentla@gmail.com>
First post2015-07-29 16:10 +0200
Last post2015-07-29 16:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: wilc1000: host_interface.c: Fix build warning Chandra S Gorentla <csgorentla@gmail.com> - 2015-07-29 16:10 +0200
    Re: [PATCH] staging: wilc1000: host_interface.c: Fix build warning Dan Carpenter <dan.carpenter@oracle.com> - 2015-07-29 16:30 +0200

#1195227 — [PATCH] staging: wilc1000: host_interface.c: Fix build warning

FromChandra S Gorentla <csgorentla@gmail.com>
Date2015-07-29 16:10 +0200
Subject[PATCH] staging: wilc1000: host_interface.c: Fix build warning
Message-ID<pRAds-1Te-23@gated-at.bofh.it>
Fixed - warning: ‘*((void *)&strHostIFmsg+4).pu8Head’ may be used uninitialized 

Signed-off-by: Chandra S Gorentla <csgorentla@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c089e73..f610903 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -7113,7 +7113,7 @@ s32 host_int_add_beacon(WILC_WFIDrvHandle hWFIDrv, u32 u32Interval,
 {
 	s32 s32Error = WILC_SUCCESS;
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
-	tstrHostIFmsg strHostIFmsg;
+	tstrHostIFmsg strHostIFmsg = {};
 	tstrHostIFSetBeacon *pstrSetBeaconParam = &strHostIFmsg.uniHostIFmsgBody.strHostIFSetBeacon;
 
 	if (pstrWFIDrv == NULL)
-- 
2.4.5

--
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/

[toc] | [next] | [standalone]


#1195242

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-07-29 16:30 +0200
Message-ID<pRAwO-2g5-7@gated-at.bofh.it>
In reply to#1195227
On Wed, Jul 29, 2015 at 07:36:59PM +0530, Chandra S Gorentla wrote:
> Fixed - warning: ‘*((void *)&strHostIFmsg+4).pu8Head’ may be used uninitialized 
> 

I can't reproduce this warning and the original code looks fine to me.

When you say the word "fix" it means the code is buggy.  Otherwise we
are just silencing warnings or cleaning up code.  It's not clear from
the patch description what is happening here, is it a bug or a warning
only?

regards,
dan carpenter

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web