mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-17 04:23:29 -05:00
Turns out that my fix was *not* good, as I cast a function pointer to a data pointer, and then back to a different function pointer, in an attempt to shut up GCC 8.x. But a cast between a function pointer and a data pointer is actually not allowed. It just happens to work on many CPUs, but maybe in the future we will all have CPUs that are safer and really have separate memory for code than for data (which would however break JITs). In any case, the cast's purpose was to avoid the warning by saying "yes, we know, this is a different pointer, but we know what we're doing, let's cast to `(void *)` as a generic pointer and then further to the one we know is the correct type". This works for data pointers of different types. For function pointers, the equivalent of `void *` is `void (*)(void)`. So let's use that instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>