From: Ilya Maximets Date: Wed, 17 Apr 2019 17:22:06 +0000 (+0300) Subject: ovn-nbctl: Fix 32-bit build with gcc. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=596acefdf30d65f37ad58f2c02f6e7c499e85d73;p=ovs.git ovn-nbctl: Fix 32-bit build with gcc. 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 CC: Mary Manohar Fixes: 1be1e0e5e0d1 ("ovn: Add generic HA chassis group") Fixes: a64bb573468f ("Policy-based routing (PBR) in OVN.") Signed-off-by: Ilya Maximets Signed-off-by: Ben Pfaff --- 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); }