summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifeng Sun <pkusunyifeng@gmail.com>2018-06-26 14:23:49 -0700
committerBen Pfaff <blp@ovn.org>2018-06-26 19:28:06 -0700
commit61677bf976e909c6bfdc03804759767145bb804c (patch)
treebb548ebeb16e487ef4b938f03d11edf8d6e50328
parentf3f835563ae0fdc99dd31c2a0714d2602f0f6466 (diff)
downloadopenvswitch-61677bf976e909c6bfdc03804759767145bb804c.tar.gz
ofp-meter: Fix ds_put_format that treats enum type as short integer
Travis job fails because of the below error and this patch solves this issue. lib/ofp-meter.c:340:48: error: format specifies type 'unsigned short' but the argument has underlying type 'unsigned int' [-Werror,-Wformat] ds_put_format(s, "flags:0x%"PRIx16" ", flags); Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--lib/ofp-meter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ofp-meter.c b/lib/ofp-meter.c
index e63daabaf..4e5cb52fd 100644
--- a/lib/ofp-meter.c
+++ b/lib/ofp-meter.c
@@ -337,7 +337,7 @@ ofp_print_meter_flags(struct ds *s, enum ofp13_meter_flags flags)
flags &= ~(OFPMF13_KBPS | OFPMF13_PKTPS | OFPMF13_BURST | OFPMF13_STATS);
if (flags) {
- ds_put_format(s, "flags:0x%"PRIx16" ", flags);
+ ds_put_format(s, "flags:0x%x", (unsigned)flags);
}
}