On Mon, Apr 10, 2023 at 01:26:12PM -0400, Mark Michelson wrote: ...
> diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c ... > @@ -2390,6 +2394,16 @@ nbctl_acl_add(struct ctl_context *ctx) > nbrec_acl_set_options(acl, &options); > } > > + const char *tier_s = shash_find_data(&ctx->options, "--tier"); > + if (tier_s) { > + int64_t tier; > + if (!str_to_long(tier_s, 10, &tier)) { > + ctl_error(ctx, "Invalid tier %s", tier_s); > + return; > + } Hi Mark, gcc has flagged that tier is int64_t but str_to_long expects a long int. utilities/ovn-nbctl.c: In function ‘nbctl_acl_add’: utilities/ovn-nbctl.c:2400:38: error: passing argument 3 of ‘str_to_long’ from incompatible pointer type [-Werror=incompatible-pointer-types] 2400 | if (!str_to_long(tier_s, 10, &tier)) { | ^~~~~ | | | int64_t * {aka long long int *} In file included from /home/runner/work/ovn/ovn/ovs/lib/hash.h:23, from /home/runner/work/ovn/ovn/ovs/lib/smap.h:20, from ./lib/lb.h:22, from utilities/ovn-nbctl.c:31: /home/runner/work/ovn/ovn/ovs/lib/util.h:243:42: note: expected ‘long int *’ but argument is of type ‘int64_t *’ {aka ‘long long int *’} 243 | bool str_to_long(const char *, int base, long *); | Link: https://github.com/ovsrobot/ovn/actions/runs/4659735446/jobs/8246953406#step:14:3266 > + nbrec_acl_set_tier(acl, tier); > + } > + > /* Check if same acl already exists for the ls/portgroup */ > size_t n_acls = pg ? pg->n_acls : ls->n_acls; > struct nbrec_acl **acls = pg ? pg->acls : ls->acls; > @@ -2418,6 +2432,10 @@ nbctl_acl_del(struct ctl_context *ctx) > { > const struct nbrec_logical_switch *ls = NULL; > const struct nbrec_port_group *pg = NULL; > + const char *tier_s = shash_find_data(&ctx->options, "--tier"); > + int64_t tier; > + unsigned long *bitmaps[3]; > + size_t n_bitmaps = 0; > > char *error = acl_cmd_get_pg_or_ls(ctx, &ls, &pg); > if (error) { > @@ -2425,8 +2443,13 @@ nbctl_acl_del(struct ctl_context *ctx) > return; > } > > - if (ctx->argc == 2) { > - /* If direction, priority, and match are not specified, delete > + if (tier_s && !str_to_long(tier_s, 10, &tier)) { Likewise, here too. > + ctl_error(ctx, "Invalid tier %s", tier_s); > + return; > + } > + > + if (ctx->argc == 2 && !tier_s) { > + /* If direction, priority, tier, and match are not specified, delete > * all ACLs. */ > if (pg) { > nbrec_port_group_verify_acls(pg); ... _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev