> 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'
>
> Squelch this by preferring the %d format specifier to print 1/0 values.
>
> Fixes: 74c4530dca93 ("ofproto-dpif: Don't slow-path controller actions
> with pause.")
> Cc: Justin Pettit <[email protected]>
> Signed-off-by: Aaron Conole <[email protected]>
> ---
> v1->v2: instead of using a cast, use a different format string.
>
Acked-by: Ian Stokes <[email protected]>
Tested-by: Ian Stokes <[email protected]>
> lib/odp-util.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/odp-util.c b/lib/odp-util.c index af995efca..8a5e9e82e
> 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -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
> --
> 2.14.3
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev