[master] 2034138ed Remove mostly harmless casts to (void*)

Dridi Boukelmoune dridi at varni.sh
Wed Feb 19 08:56:02 UTC 2020


On Wed, Feb 19, 2020 at 8:47 AM Poul-Henning Kamp <phk at freebsd.org> wrote:
>
>
> commit 2034138ed25036df7c95ac784ece9981ebc596c5
> Author: Poul-Henning Kamp <phk at FreeBSD.org>
> Date:   Wed Feb 19 08:45:59 2020 +0000
>
>     Remove mostly harmless casts to (void*)

We will need to revert this, pedantic suncc will complain on vtest.

> diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
> index 65836903c..4c8dac699 100644
> --- a/lib/libvmod_debug/vmod_debug.c
> +++ b/lib/libvmod_debug/vmod_debug.c
> @@ -928,7 +928,7 @@ xyzzy_store_ip(VRT_CTX, VCL_IP ip)
>
>         CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
>
> -       priv = VRT_priv_task(ctx, (void *)xyzzy_store_ip);
> +       priv = VRT_priv_task(ctx, xyzzy_store_ip);
>         if (priv == NULL) {
>                 VRT_fail(ctx, "no priv task - out of ws?");
>                 return;
> @@ -947,7 +947,7 @@ xyzzy_get_ip(VRT_CTX)
>
>         CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
>
> -       priv = VRT_priv_task(ctx, (void *)xyzzy_store_ip);
> +       priv = VRT_priv_task(ctx, xyzzy_store_ip);
>         AN(priv);
>         AZ(priv->free);
>
> @@ -1110,7 +1110,7 @@ xyzzy_fail_rollback(VRT_CTX)
>
>         CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
>
> -       p = VRT_priv_task(ctx, (void *)xyzzy_fail_rollback);
> +       p = VRT_priv_task(ctx, xyzzy_fail_rollback);
>         if (p == NULL) {
>                 VRT_fail(ctx, "no priv task - out of ws?");
>                 return;
> @@ -1133,7 +1133,7 @@ xyzzy_ok_rollback(VRT_CTX)
>
>         CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
>
> -       p = VRT_priv_task(ctx, (void *)xyzzy_fail_rollback);
> +       p = VRT_priv_task(ctx, xyzzy_fail_rollback);
>         if (p == NULL) {
>                 VRT_fail(ctx, "no priv task - out of ws?");
>                 return;
> _______________________________________________
> 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