2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

odp-util: Fix compiler warning.

The result of a ternary operation will be promoted at least to int type.
As such, the compiler may generate a warning as: format specifies type
'unsigned char' but the argument has type 'int'

Found with Apple LLVM version 8.1.0 (clang-802.0.42).

Squelch this by preferring the %d format specifier to print 1/0 values.

Fixes: 74c4530dca ("ofproto-dpif: Don't slow-path controller actions with pause.")
Cc: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Aaron Conole <aconole@bytheb.org>
Acked-by: Ian Stokes <ian.stokes@intel.com>
Tested-by: Ian Stokes <ian.stokes@intel.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
Aaron Conole
2018-01-16 09:05:47 -05:00
committed by Justin Pettit
parent 69f7e92f29
commit 68c5c73b09

View File

@@ -481,8 +481,8 @@ format_odp_userspace_action(struct ds *ds, const struct nlattr *attr,
ds_put_char(ds, ')');
} else if (cookie.type == USER_ACTION_COOKIE_CONTROLLER) {
ds_put_format(ds, ",controller(reason=%"PRIu16
",dont_send=%"PRIu8
",continuation=%"PRIu8
",dont_send=%d"
",continuation=%d"
",recirc_id=%"PRIu32
",rule_cookie=%#"PRIx64
",controller_id=%"PRIu16