[master] e0d10f4e1 Hint compilers we won't be returning
Dridi Boukelmoune
dridi at varni.sh
Fri Jan 10 07:32:51 UTC 2020
On Fri, Jan 10, 2020 at 12:03 AM Federico G. Schwindt <fgsch at lodoss.net> wrote:
>
>
> commit e0d10f4e157e15a076a76d4982dfd5c78334726e
> Author: Federico G. Schwindt <fgsch at lodoss.net>
> Date: Thu Jan 9 23:52:11 2020 +0000
>
> Hint compilers we won't be returning
>
> diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
> index 021335979..ce0d163fb 100644
> --- a/bin/varnishd/cache/cache_panic.c
> +++ b/bin/varnishd/cache/cache_panic.c
> @@ -849,6 +849,8 @@ ccf_panic(struct cli *cli, const char * const *av, void *priv)
> (void)av;
> AZ(priv);
> AZ(strcmp("", "You asked for it"));
> + /* NOTREACHED */
> + abort();
Why not simply a WRONG("You asked for it"); statement?
> }
>
> /*--------------------------------------------------------------------*/
> diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
> index afeb29de4..4de0db5d9 100644
> --- a/bin/varnishd/mgt/mgt_cli.c
> +++ b/bin/varnishd/mgt/mgt_cli.c
> @@ -107,6 +107,8 @@ mcf_panic(struct cli *cli, const char * const *av, void *priv)
> (void)av;
> (void)priv;
> AZ(strcmp("", "You asked for it"));
> + /* NOTREACHED */
> + abort();
> }
>
> static struct cli_proto cli_debug[] = {
> _______________________________________________
> 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