Index | Thread | Search

From:
Todd C. Miller <millert@openbsd.org>
Subject:
Re: md5(1): avoid undefined function pointer casts
To:
Theo Buehler <tb@theobuehler.org>
Cc:
tech@openbsd.org
Date:
Wed, 16 Jul 2025 15:10:24 -0600

Download raw body.

Thread
On Wed, 16 Jul 2025 21:46:22 +0200, Theo Buehler wrote:

> The below avoids this by adding wrappers that have the correct types
> and that then propagate their parameters in a defined way. As I said,
> it's stupid and ugly and the one upside apart from appeasing the
> language lawyers I can see is that we no longer have function pointer
> casts.

That's annoying but I suppose it is the best solution we have.  Does
this compile with SHA2_ONLY defined?  Also, I wonder if it is worth
using union ANY_CTX to cut down on all the void *ctx.

 - todd