diff mbox series

[ovs-dev] ovn-nbctl: Fix 32-bit build with gcc.

Message ID 20190417172206.4693-1-i.maximets@samsung.com
State Accepted
Headers show
Series [ovs-dev] ovn-nbctl: Fix 32-bit build with gcc. | expand

Commit Message

Ilya Maximets April 17, 2019, 5:22 p.m. UTC
ovn/utilities/ovn-nbctl.c: In function 'print_routing_policy':
ovn/utilities/ovn-nbctl.c:3620:23: error: format '%ld' expects argument
    of type 'long int', but argument 3 has type 'int64_t'
                       policy->match, policy->action, next_hop);
                       ^
ovn/utilities/ovn-nbctl.c:3624:23: error: format '%ld' expects argument
    of type 'long int', but argument 3 has type 'int64_t'
                       policy->match, policy->action);
                       ^
ovn/utilities/ovn-nbctl.c: In function 'cmd_ha_ch_grp_list':
ovn/utilities/ovn-nbctl.c:5056:27: error: format '%lu' expects argument
    of type 'long unsigned int', but argument 10 has type 'int64_t'
                           ha_ch->priority);
                           ^
cc1: all warnings being treated as errors
make[2]: *** [ovn/utilities/ovn-nbctl.o] Error 1

https://travis-ci.org/openvswitch/ovs/jobs/521015912

CC: Numan Siddique <nusiddiq@redhat.com>
CC: Mary Manohar <mary.manohar@nutanix.com>
Fixes: 1be1e0e5e0d1 ("ovn: Add generic HA chassis group")
Fixes: a64bb573468f ("Policy-based routing (PBR) in OVN.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 ovn/utilities/ovn-nbctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ben Pfaff April 17, 2019, 5:47 p.m. UTC | #1
On Wed, Apr 17, 2019 at 08:22:06PM +0300, Ilya Maximets wrote:
> ovn/utilities/ovn-nbctl.c: In function 'print_routing_policy':
> ovn/utilities/ovn-nbctl.c:3620:23: error: format '%ld' expects argument
>     of type 'long int', but argument 3 has type 'int64_t'
>                        policy->match, policy->action, next_hop);
>                        ^
> ovn/utilities/ovn-nbctl.c:3624:23: error: format '%ld' expects argument
>     of type 'long int', but argument 3 has type 'int64_t'
>                        policy->match, policy->action);
>                        ^
> ovn/utilities/ovn-nbctl.c: In function 'cmd_ha_ch_grp_list':
> ovn/utilities/ovn-nbctl.c:5056:27: error: format '%lu' expects argument
>     of type 'long unsigned int', but argument 10 has type 'int64_t'
>                            ha_ch->priority);
>                            ^
> cc1: all warnings being treated as errors
> make[2]: *** [ovn/utilities/ovn-nbctl.o] Error 1
> 
> https://travis-ci.org/openvswitch/ovs/jobs/521015912

Thanks.  Applied to master.
diff mbox series

Patch

diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index b7004b668..e86ab7f7a 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -3616,11 +3616,11 @@  print_routing_policy(const struct nbrec_logical_router_policy *policy,
 {
     if (policy->nexthop != NULL) {
         char *next_hop = normalize_prefix_str(policy->nexthop);
-        ds_put_format(s, "%10ld %50s %15s %25s", policy->priority,
+        ds_put_format(s, "%10"PRId64" %50s %15s %25s", policy->priority,
                       policy->match, policy->action, next_hop);
         free(next_hop);
     } else {
-        ds_put_format(s, "%10ld %50s %15s", policy->priority,
+        ds_put_format(s, "%10"PRId64" %50s %15s", policy->priority,
                       policy->match, policy->action);
     }
     ds_put_char(s, '\n');
@@ -5051,7 +5051,7 @@  cmd_ha_ch_grp_list(struct ctl_context *ctx)
             ha_ch = ha_ch_grp->ha_chassis[i];
             ds_put_format(&ctx->output,
                           "    "UUID_FMT " (%s)\n"
-                          "    priority %lu\n\n",
+                          "    priority %"PRId64"\n\n",
                           UUID_ARGS(&ha_ch->header_.uuid), ha_ch->chassis_name,
                           ha_ch->priority);
         }