Skip to content

Commit

Permalink
ofp-parse: Fix GCC compiler warnings with -O3.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
ejj committed Jan 22, 2014
1 parent 7849d3e commit 87f1e51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ofp-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 87f1e51

Please sign in to comment.