> From: Bruno Haible <br...@clisp.org>
> Date: Sat, 18 Aug 2018 18:09:27 +0200
> Cc: Paul Eggert <egg...@cs.ucla.edu>, Andy Moreton <andrewjmore...@gmail.com>,
>       emacs-de...@gnu.org
> 
> So, there are 4 options:
>   1) Use static reference to Windows API functions.
>   2) Use '#pragma GCC diagnostic ignored "-Wcast-function-type"'
>   3) Remove -Wcast-function-type from the compiler options.
>   4) Live with the warning.
> 
> I'm opposed to 1), since it removes either features or portability.
> 
> I could do 2), but it does not feel like the right thing, to silence
> a compiler warning when the user has explicitly requested a warning.
> 
> So, please choose among 3) and 4).

There's also this additional option:

  5) Cast through (void *).  Like this:

      GetSystemTimePreciseAsFileTimeFunc =
        (GetSystemTimePreciseAsFileTimeFuncType) (void (*) (void)) 
GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");


Reply via email to