On Sun, Jan 18, 2026 at 5:20 AM Branko Čibej <[email protected]> wrote:

> On 17. 1. 26 19:17, [email protected] wrote:
>
> Author: rinrab
> Date: Sat Jan 17 18:17:34 2026
> New Revision: 1931392
>
> Log:
> Follow-up to r1931389: Fix compilation with MSVC.
>
> * subversion/libsvn_subr/checksum_apr.c
>   (svn_checksum__sha1, svn_checksum__sha1_ctx_update): Cast 'void *' to
>   'char *' explicitly.
>
>
>
> I don't understand. Implicit conversion from (const void*) to (const
> char*) is allowed in C, it's only forbidden in C++, where you have to use 
> static_cast<const
> char*>. If MSVC treats this as an error, then it's not a C compiler,
> which I doubt. So what was the error message from the compiler that
> prompted this change?
>
> The reason I'm commenting on this apparently trivial change is that
> typecasts – any typecasts – in C are always suspect and should be avoided
> if at all possible. Not because of some philosophical purity but because
> they can silently hide new bug that might be introduced because of some
> code change sometime in the future.
>
> -- Brane
>
>
It was not the cause of the issue. I reverted this revision later
in r1931394. I'm just stupid because I was adding a void pointer and an
integer inside of the function (that handles blocks). For some reason, GCC
doesn't treat it as an error nor a warning.

The actual fix is r1931395.

-- 
Timofei Zhakov

Reply via email to