summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7c35397)
GCC 4.6.3 gets confused by the str_to_*() functions in ofp-parse and
spits out the following warning.
error: ‘priority’ may be used uninitialized in this function
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
static char * WARN_UNUSED_RESULT
str_to_be64(const char *str, ovs_be64 *valuep)
{
static char * WARN_UNUSED_RESULT
str_to_be64(const char *str, ovs_be64 *valuep)
{
char *error;
error = str_to_u64(str, &value);
char *error;
error = str_to_u64(str, &value);
table_s = strsep(&arg, ",");
if (table_s && table_s[0]) {
table_s = strsep(&arg, ",");
if (table_s && table_s[0]) {
char *error;
error = str_to_u32(table_s, &table_id);
char *error;
error = str_to_u32(table_s, &table_id);
size_t orig_size = ofpacts->size;
struct ofpact_tunnel *tunnel;
char *error = NULL;
size_t orig_size = ofpacts->size;
struct ofpact_tunnel *tunnel;
char *error = NULL;
- uint16_t ethertype;
- uint16_t vid;
- uint8_t pcp;
- uint8_t tos;
+ uint16_t ethertype = 0;
+ uint16_t vid = 0;
+ uint8_t tos = 0;
+ uint8_t pcp = 0;
switch (code) {
case OFPUTIL_ACTION_INVALID:
switch (code) {
case OFPUTIL_ACTION_INVALID:
value);
}
} else if (fields & F_PRIORITY && !strcmp(name, "priority")) {
value);
}
} else if (fields & F_PRIORITY && !strcmp(name, "priority")) {
error = str_to_u16(value, name, &priority);
fm->priority = priority;
error = str_to_u16(value, name, &priority);
fm->priority = priority;