diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-25 19:57:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 19:57:30 -0500 |
commit | 3ed7cc0f8b29da4304825a7bcef25fc83f84c1ae (patch) | |
tree | ee7dcfc216faa1668b763b25af55ad569e920f28 /net | |
parent | b71e839f9a33abf8634b1eea4875bc8057fe39e2 (diff) |
dccp: fix warning in net/dccp/options.c
this warning:
net/dccp/options.c: In function ‘dccp_parse_options’:
net/dccp/options.c:67: warning: ‘value’ may be used uninitialized in this function
is a bogus GCC warning. The compiler does not recognize the relation
between "value" and "mandatory" variables: the code flow can ever reach
the "out_invalid_option:" label if 'mandatory' is set to 1, and when
'mandatory' is non-zero, we'll always have 'value' initialized.
Help out the compiler by annotating the variable.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c index bfa1cb8f3ef1..20d5c72d1fdb 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -67,7 +67,7 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, | |||
67 | (dh->dccph_doff * 4); | 67 | (dh->dccph_doff * 4); |
68 | struct dccp_options_received *opt_recv = &dp->dccps_options_received; | 68 | struct dccp_options_received *opt_recv = &dp->dccps_options_received; |
69 | unsigned char opt, len; | 69 | unsigned char opt, len; |
70 | unsigned char *value; | 70 | unsigned char *uninitialized_var(value); |
71 | u32 elapsed_time; | 71 | u32 elapsed_time; |
72 | __be32 opt_val; | 72 | __be32 opt_val; |
73 | int rc; | 73 | int rc; |