summaryrefslogtreecommitdiff
path: root/lib/ofp-parse.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2014-01-16 16:26:37 -0800
committerEthan Jackson <ethan@nicira.com>2014-01-22 08:50:02 -0800
commit87f1e513e1388107014fb3df461f30d7f58c6dec (patch)
tree8664f64b71b3f8efc952419eb99ffd7928a834ff /lib/ofp-parse.c
parent7849d3e4cab657eb42b513b0d9ad656fc38259bd (diff)
downloadopenvswitch-87f1e513e1388107014fb3df461f30d7f58c6dec.tar.gz
ofp-parse: Fix GCC compiler warnings with -O3.
When compiling with -O3, GCC can no longer tell that the following warnings are not valid. At any rate, they're easy enough to silence. ofp-parse.c:764:45: error: 'ttl' may be used uninitialized in this function ofp-parse.c:752:17: error: 'ecn' may be used uninitialized in this function Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofp-parse.c')
-rw-r--r--lib/ofp-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
index 251adfac8..b254ac6ec 100644
--- a/lib/ofp-parse.c
+++ b/lib/ofp-parse.c
@@ -639,7 +639,9 @@ parse_named_action(enum ofputil_action_code code,
char *error = NULL;
uint16_t ethertype = 0;
uint16_t vid = 0;
- uint8_t tos = 0, ecn, ttl;
+ uint8_t tos = 0;
+ uint8_t ecn = 0;
+ uint8_t ttl = 0;
uint8_t pcp = 0;
switch (code) {