summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2012-07-17 09:28:06 -0700
committerEthan Jackson <ethan@nicira.com>2012-07-20 13:11:35 -0700
commit009e008b519ca73c819d8f7db139454f6745b718 (patch)
treef2abee1712dadbee039f7efc1fefdeb12f82f14e
parentdd2a039e9f20cf817d679333b27660deecf49c0d (diff)
downloadopenvswitch-009e008b519ca73c819d8f7db139454f6745b718.tar.gz
ofproto: Fix compiler warnings.
This patch fixes the following warnings on my system: lib/ofp-actions.c:458:13: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format] ofproto/ofproto.c:3940:13: error: comparison between 'enum ofoperation_type' and 'enum nx_flow_update_event' [-Werror=enum-compare] ofproto/ofproto.c:3941:13: error: comparison between 'enum ofoperation_type' and 'enum nx_flow_update_event' [-Werror=enum-compare] ofproto/ofproto.c:3942:13: error: comparison between 'enum ofoperation_type' and 'enum nx_flow_update_event' [-Werror=enum-compare] Signed-off-by: Ethan Jackson <ethan@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r--lib/ofp-actions.c2
-rw-r--r--ofproto/ofproto.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 582b5aea6..5681fba8a 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -455,7 +455,7 @@ ofpacts_from_openflow10(const union ofp_action *in, size_t n_in,
ds_init(&s);
ds_put_hex_dump(&s, in, n_in * sizeof *a, 0, false);
- VLOG_WARN("bad action format at offset %#x:\n%s",
+ VLOG_WARN("bad action format at offset %#zx:\n%s",
(n_in - left) * sizeof *a, ds_cstr(&s));
ds_destroy(&s);
}
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index b187c86fb..4daa0cd77 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3937,9 +3937,12 @@ ofopgroup_complete(struct ofopgroup *group)
if (!op->error && !ofproto_rule_is_hidden(rule)) {
/* Check that we can just cast from ofoperation_type to
* nx_flow_update_event. */
- BUILD_ASSERT_DECL(OFOPERATION_ADD == NXFME_ADDED);
- BUILD_ASSERT_DECL(OFOPERATION_DELETE == NXFME_DELETED);
- BUILD_ASSERT_DECL(OFOPERATION_MODIFY == NXFME_MODIFIED);
+ BUILD_ASSERT_DECL((enum nx_flow_update_event) OFOPERATION_ADD
+ == NXFME_ADDED);
+ BUILD_ASSERT_DECL((enum nx_flow_update_event) OFOPERATION_DELETE
+ == NXFME_DELETED);
+ BUILD_ASSERT_DECL((enum nx_flow_update_event) OFOPERATION_MODIFY
+ == NXFME_MODIFIED);
ofmonitor_report(ofproto->connmgr, rule,
(enum nx_flow_update_event) op->type,