* [PATCH] tipc: eliminate uninitialized variable warning
@ 2016-06-15 6:11 Ying Xue
2016-06-16 4:47 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ying Xue @ 2016-06-15 6:11 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, erik.hugne, netdev, tipc-discussion
net/tipc/link.c: In function ‘tipc_link_timeout’:
net/tipc/link.c:744:28: warning: ‘mtyp’ may be used uninitialized in this function [-Wuninitialized]
Fixes: 42b18f605fea ("tipc: refactor function tipc_link_timeout()")
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
---
net/tipc/link.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 7059c94..67b6ab9 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -704,7 +704,8 @@ static void link_profile_stats(struct tipc_link *l)
*/
int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq)
{
- int mtyp, rc = 0;
+ int mtyp = 0;
+ int rc = 0;
bool state = false;
bool probe = false;
bool setup = false;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tipc: eliminate uninitialized variable warning
2016-06-15 6:11 [PATCH] tipc: eliminate uninitialized variable warning Ying Xue
@ 2016-06-16 4:47 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-06-16 4:47 UTC (permalink / raw)
To: ying.xue; +Cc: jon.maloy, erik.hugne, netdev, tipc-discussion
From: Ying Xue <ying.xue@windriver.com>
Date: Wed, 15 Jun 2016 14:11:31 +0800
> net/tipc/link.c: In function ‘tipc_link_timeout’:
> net/tipc/link.c:744:28: warning: ‘mtyp’ may be used uninitialized in this function [-Wuninitialized]
>
> Fixes: 42b18f605fea ("tipc: refactor function tipc_link_timeout()")
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> Signed-off-by: Ying Xue <ying.xue@windriver.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-16 4:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 6:11 [PATCH] tipc: eliminate uninitialized variable warning Ying Xue
2016-06-16 4:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).