On Sat 11 Aug 2018, Eli Zaretskii wrote: >> From: Andy Moreton >> Date: Sat, 11 Aug 2018 20:04:26 +0100 >> >> >> Or maybe we should introduce our ownj get_proc_address, which returns >> >> a (void (*)(void)) pointer. But that's not for emacs-26, sorry. > > Yes, that's what I had in mind, just with a comment explaining why we > need to jump through that particular hoop. The attached patch fixes the -Wcast-function-type warnings when building on Windows MSYS2 64bit (GCC 8.2.0) with "-Og". Theere is one remaining compiler warning: C:/emacs/git/emacs/master/src/w32fns.c: In function 'Fw32_read_registry': C:/emacs/git/emacs/master/src/w32fns.c:10142:21: warning: 'rootkey' may be used uninitialized in this function [-Wmaybe-uninitialized] Lisp_Object val = w32_read_registry (NILP (root) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ? HKEY_CURRENT_USER ~~~~~~~~~~~~~~~~~~~ : rootkey, ~~~~~~~~~~ key, name); ~~~~~~~~~~