[master] b0af060fb simple fix for fedora/gcc-10.0.1: -Werror=format-overflow, by some reason hit on s390x

Dridi Boukelmoune dridi at varni.sh
Wed Feb 12 14:06:17 UTC 2020


On Tue, Feb 11, 2020 at 2:08 PM Nils Goroll <nils.goroll at uplex.de> wrote:
>
>
> commit b0af060fb688b8fc2ff3817ea99430432668b291
> Author: Ingvar Hagelund <ingvar at redpill-linpro.com>
> Date:   Tue Feb 11 12:56:54 2020 +0100
>
>     simple fix for fedora/gcc-10.0.1: -Werror=format-overflow, by some reason hit on s390x
>
> diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
> index 1ec748cb6..09e49d258 100644
> --- a/bin/varnishtest/vtc_varnish.c
> +++ b/bin/varnishtest/vtc_varnish.c
> @@ -121,7 +121,7 @@ varnish_ask_cli(const struct varnish *v, const char *cmd, char **repl)
>         i = VCLI_ReadResult(v->cli_fd, &retval, &r, vtc_maxdur);
>         if (i != 0 && !vtc_stop)
>                 vtc_fatal(v->vl, "CLI failed (%s) = %d %u %s",
> -                   cmd, i, retval, r);
> +                   cmd != NULL ? cmd : "NULL", i, retval, r);

We shouldn't blindly take this change, we should instead ask the GCC
or Fedora folks (or their intersection) why this is happening. We are
hiding a potential bug under the rug here.

GCC 10 turned some flags on by default and this resulted in one
legitimate report [1] in Hitch, I'm not convinced by this one.

Dridi

[1] https://github.com/varnish/hitch/issues/326


Dridi

>         vtc_log(v->vl, 3, "CLI RX  %u", retval);
>         vtc_dump(v->vl, 4, "CLI RX", r, -1);
>         if (repl != NULL)
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit


More information about the varnish-commit mailing list