emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New warnings on emacs-26 branch with gcc 8.2.0


From: Andy Moreton
Subject: Re: New warnings on emacs-26 branch with gcc 8.2.0
Date: Sat, 11 Aug 2018 16:02:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt)

On Sat 11 Aug 2018, Eli Zaretskii wrote:

>> From: Andy Moreton <address@hidden>
>> Date: Sat, 11 Aug 2018 11:41:20 +0100
>> 
>> > OK, I've now done so.  Andrew, please see if this fixes the original
>> > problem with this warning.
>> 
>> Yes, that ha removed that batch of warnings.
>
> Thanks for testing.
>
>> There are still other warnings: one from -Wformat-overflow and 78 from
>> -Wcast-function-type.
>
> Can you show the warnings from -Wcast-function-type?

Here are the warnings from commit ec6f588940e5, built with gcc 8.2.0.
Mostly this seems to be GetProcAddress results, where it complains that
FARPROC and the desired fuinction type don't match. The gcc manual says
that casting via "void (*)(void)" can be used to pacify the warning.


  CC       dynlib.o
C:/emacs/git/emacs/emacs-26/src/dynlib.c: In function 'dynlib_addr':
C:/emacs/git/emacs/emacs-26/src/dynlib.c:160:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(DWORD,  const CHAR *, struct HINSTANCE__ **)' {aka 'int (*)(long unsigned 
int,  const char *, struct HINSTANCE__ **)'} [-Wcast-function-type]
      (GetModuleHandleExA_Proc) GetProcAddress (hm_kernel32,
      ^
  CC       emacs-module.o
C:/emacs/git/emacs/emacs-26/src/emacs-module.c: In function 'Fmodule_load':
C:/emacs/git/emacs/emacs-26/src/emacs-module.c:708:17: warning: cast between 
incompatible function types from 'dynlib_function_ptr' {aka 'struct 
dynlib_function_ptr_nonce * (*)(void)'} to 'int (*)(struct emacs_runtime *)' 
[-Wcast-function-type]
   module_init = (emacs_init_function) dynlib_func (handle, 
"emacs_module_init");
                 ^
  CC       w32fns.o
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 'setup_w32_kbdhook':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:2642:52: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void)' {aka 'int (*)(void)'} [-Wcast-function-type]
       IsDebuggerPresent_Proc is_debugger_present = (IsDebuggerPresent_Proc)
                                                    ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:2657:43: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'struct HWND__ * (*)(void)' [-Wcast-function-type]
       GetConsoleWindow_Proc get_console = (GetConsoleWindow_Proc)
                                           ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 'Ffile_system_info':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:9376:7: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(const WCHAR *, ULARGE_INTEGER *, ULARGE_INTEGER *, ULARGE_INTEGER *)' {aka 
'int (*)(const short unsigned int *, union _ULARGE_INTEGER *, union 
_ULARGE_INTEGER *, union _ULARGE_INTEGER *)'} [-Wcast-function-type]
       (GetDiskFreeSpaceExW_Proc) GetProcAddress (hKernel, 
"GetDiskFreeSpaceExW");
       ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:9378:7: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(const CHAR *, ULARGE_INTEGER *, ULARGE_INTEGER *, ULARGE_INTEGER *)' {aka 
'int (*)(const char *, union _ULARGE_INTEGER *, union _ULARGE_INTEGER *, union 
_ULARGE_INTEGER *)'} [-Wcast-function-type]
       (GetDiskFreeSpaceExA_Proc) GetProcAddress (hKernel, 
"GetDiskFreeSpaceExA");
       ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 'get_dll_version':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:9954:4: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'HRESULT (*)(DLLVERSIONINFO *)' {aka 'long int (*)(struct _DLLVERSIONINFO *)'} 
[-Wcast-function-type]
  = (DLLGETVERSIONPROC) GetProcAddress (hdll, "DllGetVersion");
    ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 
'w32_reset_stack_overflow_guard':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:10856:7: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int 
(*)(void)' [-Wcast-function-type]
       (_resetstkoflw_proc)GetProcAddress (GetModuleHandle ("msvcrt.dll"),
       ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 'w32_backtrace':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:10932:2: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'USHORT (*)(ULONG,  ULONG,  void **, ULONG *)' {aka 'short unsigned int 
(*)(long unsigned int,  long unsigned int,  void **, long unsigned int *)'} 
[-Wcast-function-type]
  (CaptureStackBackTrace_proc) GetProcAddress (hm_kernel32,
  ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c: In function 'globals_of_w32fns':
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11065:26: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct tagTRACKMOUSEEVENT *)' {aka 'int (*)(struct tagTRACKMOUSEEVENT *)'} 
[-Wcast-function-type]
   track_mouse_event_fn = (TrackMouseEvent_Proc)
                          ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11068:27: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'struct HMONITOR__ * (*)(POINT,  DWORD)' {aka 'struct HMONITOR__ * (*)(struct 
tagPOINT,  long unsigned int)'} [-Wcast-function-type]
   monitor_from_point_fn = (MonitorFromPoint_Proc)
                           ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11070:25: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HMONITOR__ *, struct MONITOR_INFO *)' {aka 'int (*)(struct 
HMONITOR__ *, struct MONITOR_INFO *)'} [-Wcast-function-type]
   get_monitor_info_fn = (GetMonitorInfo_Proc)
                         ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11072:28: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'struct HMONITOR__ * (*)(struct HWND__ *, DWORD)' {aka 'struct HMONITOR__ * 
(*)(struct HWND__ *, long unsigned int)'} [-Wcast-function-type]
   monitor_from_window_fn = (MonitorFromWindow_Proc)
                            ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11074:30: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HDC__ *, RECT *, BOOL (*)(struct HMONITOR__ *, struct HDC__ *, RECT 
*, LPARAM), LPARAM)' {aka 'int (*)(struct HDC__ *, struct tagRECT *, int 
(*)(struct HMONITOR__ *, struct HDC__ *, struct tagRECT *, long long int), long 
long int)'} [-Wcast-function-type]
   enum_display_monitors_fn = (EnumDisplayMonitors_Proc)
                              ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11076:27: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HWND__ *, TITLEBAR_INFO *)' {aka 'int (*)(struct HWND__ *, struct 
<anonymous> *)'} [-Wcast-function-type]
   get_title_bar_info_fn = (GetTitleBarInfo_Proc)
                           ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11081:33: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'LONG 
(*)(struct HIMC__ *, DWORD,  void *, DWORD)' {aka 'long int (*)(struct HIMC__ 
*, long unsigned int,  void *, long unsigned int)'} [-Wcast-function-type]
     get_composition_string_fn = (ImmGetCompositionString_Proc)
                                 ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11083:26: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'struct HIMC__ * (*)(struct HWND__ *)' [-Wcast-function-type]
     get_ime_context_fn = (ImmGetContext_Proc)
                          ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11085:30: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HWND__ *, struct HIMC__ *)' {aka 'int (*)(struct HWND__ *, struct 
HIMC__ *)'} [-Wcast-function-type]
     release_ime_context_fn = (ImmReleaseContext_Proc)
                              ^
C:/emacs/git/emacs/emacs-26/src/w32fns.c:11087:37: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HIMC__ *, COMPOSITIONFORM *)' {aka 'int (*)(struct HIMC__ *, struct 
tagCOMPOSITIONFORM *)'} [-Wcast-function-type]
     set_ime_composition_window_fn = (ImmSetCompositionWindow_Proc)
                                     ^
  CC       w32menu.o
C:/emacs/git/emacs/emacs-26/src/w32menu.c: In function 'globals_of_w32menu':
C:/emacs/git/emacs/emacs-26/src/w32menu.c:1609:24: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HMENU__ *, UINT,  BOOL,  struct tagMENUITEMINFOA *)' {aka 'int 
(*)(struct HMENU__ *, unsigned int,  int,  struct tagMENUITEMINFOA *)'} 
[-Wcast-function-type]
   get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, 
"GetMenuItemInfoA");
                        ^
C:/emacs/git/emacs/emacs-26/src/w32menu.c:1610:24: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HMENU__ *, UINT,  BOOL,  const MENUITEMINFOA *)' {aka 'int 
(*)(struct HMENU__ *, unsigned int,  int,  const struct tagMENUITEMINFOA *)'} 
[-Wcast-function-type]
   set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, 
"SetMenuItemInfoA");
                        ^
C:/emacs/git/emacs/emacs-26/src/w32menu.c:1611:25: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HMENU__ *, UINT,  UINT_PTR,  const WCHAR *)' {aka 'int (*)(struct 
HMENU__ *, unsigned int,  long long unsigned int,  const short unsigned int 
*)'} [-Wcast-function-type]
   unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, 
"AppendMenuW");
                         ^
C:/emacs/git/emacs/emacs-26/src/w32menu.c:1612:25: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int 
(*)(struct HWND__ *, const WCHAR *, const WCHAR *, UINT)' {aka 'int (*)(struct 
HWND__ *, const short unsigned int *, const short unsigned int *, unsigned 
int)'} [-Wcast-function-type]
   unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, 
"MessageBoxW");
                         ^
  CC       w32font.o
C:/emacs/git/emacs/emacs-26/src/w32font.c: In function 'get_outline_metrics_w':
C:/emacs/git/emacs/emacs-26/src/w32font.c:155:36: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'UINT 
(*)(struct HDC__ *, UINT,  struct _OUTLINETEXTMETRICW *)' {aka 'unsigned int 
(*)(struct HDC__ *, unsigned int,  struct _OUTLINETEXTMETRICW *)'} 
[-Wcast-function-type]
  s_pfn_Get_Outline_Text_MetricsW = (GetOutlineTextMetricsW_Proc)
                                    ^
C:/emacs/git/emacs/emacs-26/src/w32font.c: In function 'get_text_metrics_w':
C:/emacs/git/emacs/emacs-26/src/w32font.c:172:28: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HDC__ *, struct tagTEXTMETRICW *)' {aka 'int (*)(struct HDC__ *, 
struct tagTEXTMETRICW *)'} [-Wcast-function-type]
  s_pfn_Get_Text_MetricsW = (GetTextMetricsW_Proc)
                            ^
C:/emacs/git/emacs/emacs-26/src/w32font.c: In function 'get_glyph_outline_w':
C:/emacs/git/emacs/emacs-26/src/w32font.c:190:29: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'DWORD (*)(struct HDC__ *, UINT,  UINT,  struct _GLYPHMETRICS *, DWORD,  void 
*, const MAT2 *)' {aka 'long unsigned int (*)(struct HDC__ *, unsigned int,  
unsigned int,  struct _GLYPHMETRICS *, long unsigned int,  void *, const struct 
_MAT2 *)'} [-Wcast-function-type]
  s_pfn_Get_Glyph_OutlineW = (GetGlyphOutlineW_Proc)
                             ^
C:/emacs/git/emacs/emacs-26/src/w32font.c: In function 'get_char_width_32_w':
C:/emacs/git/emacs/emacs-26/src/w32font.c:208:29: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct HDC__ *, UINT,  UINT,  int *)' {aka 'int (*)(struct HDC__ *, 
unsigned int,  unsigned int,  int *)'} [-Wcast-function-type]
  s_pfn_Get_Char_Width_32W = (GetCharWidth32W_Proc)
                             ^
  CC       w32uniscribe.o
C:/emacs/git/emacs/emacs-26/src/w32uniscribe.c: In function 
'syms_of_w32uniscribe':
C:/emacs/git/emacs/emacs-26/src/w32uniscribe.c:1196:32: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'HRESULT (*)(struct HDC__ *, void **, SCRIPT_ANALYSIS *, int,  OPENTYPE_TAG *, 
int *)' {aka 'long int (*)(struct HDC__ *, void **, struct tag_SCRIPT_ANALYSIS 
*, int,  long unsigned int *, int *)'} [-Wcast-function-type]
   script_get_font_scripts_fn = (ScriptGetFontScriptTags_Proc)
                                ^
C:/emacs/git/emacs/emacs-26/src/w32uniscribe.c:1198:34: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'HRESULT (*)(struct HDC__ *, void **, SCRIPT_ANALYSIS *, OPENTYPE_TAG,  int,  
OPENTYPE_TAG *, int *)' {aka 'long int (*)(struct HDC__ *, void **, struct 
tag_SCRIPT_ANALYSIS *, long unsigned int,  int,  long unsigned int *, int *)'} 
[-Wcast-function-type]
   script_get_font_languages_fn = (ScriptGetFontLanguageTags_Proc)
                                  ^
C:/emacs/git/emacs/emacs-26/src/w32uniscribe.c:1200:33: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'HRESULT (*)(struct HDC__ *, void **, SCRIPT_ANALYSIS *, OPENTYPE_TAG,  
OPENTYPE_TAG,  int,  OPENTYPE_TAG *, int *)' {aka 'long int (*)(struct HDC__ *, 
void **, struct tag_SCRIPT_ANALYSIS *, long unsigned int,  long unsigned int,  
int,  long unsigned int *, int *)'} [-Wcast-function-type]
   script_get_font_features_fn = (ScriptGetFontFeatureTags_Proc)
                                 ^
  CC       w32.o
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'open_process_token':
C:/emacs/git/emacs/emacs-26/src/w32.c:574:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(void *, 
DWORD,  void **)' {aka 'int (*)(void *, long unsigned int,  void **)'} 
[-Wcast-function-type]
         (OpenProcessToken_Proc) GetProcAddress (hm_advapi32, 
"OpenProcessToken");
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_token_information':
C:/emacs/git/emacs/emacs-26/src/w32.c:606:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(void *, 
TOKEN_INFORMATION_CLASS,  void *, DWORD,  DWORD *)' {aka 'int (*)(void *, enum 
_TOKEN_INFORMATION_CLASS,  void *, long unsigned int,  long unsigned int *)'} 
[-Wcast-function-type]
         (GetTokenInformation_Proc) GetProcAddress (hm_advapi32, 
"GetTokenInformation");
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'lookup_account_sid':
C:/emacs/git/emacs/emacs-26/src/w32.c:642:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(const 
CHAR *, void *, CHAR *, DWORD *, CHAR *, DWORD *, enum _SID_NAME_USE *)' {aka 
'int (*)(const char *, void *, char *, long unsigned int *, char *, long 
unsigned int *, enum _SID_NAME_USE *)'} [-Wcast-function-type]
         (LookupAccountSid_Proc) GetProcAddress (hm_advapi32, 
LookupAccountSid_Name);
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_sid_sub_authority':
C:/emacs/git/emacs/emacs-26/src/w32.c:675:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'DWORD * (*)(void 
*, DWORD)' {aka 'long unsigned int * (*)(void *, long unsigned int)'} 
[-Wcast-function-type]
         (GetSidSubAuthority_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'get_sid_sub_authority_count':
C:/emacs/git/emacs/emacs-26/src/w32.c:700:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'UCHAR * (*)(void 
*)' {aka 'unsigned char * (*)(void *)'} [-Wcast-function-type]
         (GetSidSubAuthorityCount_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_security_info':
C:/emacs/git/emacs/emacs-26/src/w32.c:731:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'DWORD (*)(void *, 
SE_OBJECT_TYPE,  SECURITY_INFORMATION,  void **, void **, ACL **, ACL **, void 
**)' {aka 'long unsigned int (*)(void *, enum _SE_OBJECT_TYPE,  long unsigned 
int,  void **, void **, struct _ACL **, struct _ACL **, void **)'} 
[-Wcast-function-type]
         (GetSecurityInfo_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_file_security':
C:/emacs/git/emacs/emacs-26/src/w32.c:767:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(const 
WCHAR *, SECURITY_INFORMATION,  void *, DWORD,  DWORD *)' {aka 'int (*)(const 
short unsigned int *, long unsigned int,  void *, long unsigned int,  long 
unsigned int *)'} [-Wcast-function-type]
      (GetFileSecurityW_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c:789:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(const 
CHAR *, SECURITY_INFORMATION,  void *, DWORD,  DWORD *)' {aka 'int (*)(const 
char *, long unsigned int,  void *, long unsigned int,  long unsigned int *)'} 
[-Wcast-function-type]
      (GetFileSecurityA_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'set_file_security':
C:/emacs/git/emacs/emacs-26/src/w32.c:826:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(const 
WCHAR *, SECURITY_INFORMATION,  void *)' {aka 'int (*)(const short unsigned int 
*, long unsigned int,  void *)'} [-Wcast-function-type]
      (SetFileSecurityW_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c:847:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(const 
CHAR *, SECURITY_INFORMATION,  void *)' {aka 'int (*)(const char *, long 
unsigned int,  void *)'} [-Wcast-function-type]
      (SetFileSecurityA_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'set_named_security_info':
C:/emacs/git/emacs/emacs-26/src/w32.c:887:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'DWORD (*)(const 
WCHAR *, SE_OBJECT_TYPE,  SECURITY_INFORMATION,  void *, void *, ACL *, ACL *)' 
{aka 'long unsigned int (*)(const short unsigned int *, enum _SE_OBJECT_TYPE,  
long unsigned int,  void *, void *, struct _ACL *, struct _ACL *)'} 
[-Wcast-function-type]
      (SetNamedSecurityInfoW_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c:909:6: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'DWORD (*)(const 
CHAR *, SE_OBJECT_TYPE,  SECURITY_INFORMATION,  void *, void *, ACL *, ACL *)' 
{aka 'long unsigned int (*)(const char *, enum _SE_OBJECT_TYPE,  long unsigned 
int,  void *, void *, struct _ACL *, struct _ACL *)'} [-Wcast-function-type]
      (SetNamedSecurityInfoA_Proc) GetProcAddress (hm_advapi32,
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'get_security_descriptor_owner':
C:/emacs/git/emacs/emacs-26/src/w32.c:941:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(void *, 
void **, WINBOOL *)' {aka 'int (*)(void *, void **, int *)'} 
[-Wcast-function-type]
         (GetSecurityDescriptorOwner_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'get_security_descriptor_group':
C:/emacs/git/emacs/emacs-26/src/w32.c:970:9: warning: cast between incompatible 
function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(void *, 
void **, WINBOOL *)' {aka 'int (*)(void *, void **, int *)'} 
[-Wcast-function-type]
         (GetSecurityDescriptorGroup_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'get_security_descriptor_dacl':
C:/emacs/git/emacs/emacs-26/src/w32.c:1000:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, WINBOOL *, ACL **, WINBOOL *)' {aka 'int (*)(void *, int *, struct 
_ACL **, int *)'} [-Wcast-function-type]
         (GetSecurityDescriptorDacl_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'is_valid_sid':
C:/emacs/git/emacs/emacs-26/src/w32.c:1027:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *)' {aka 'int (*)(void *)'} [-Wcast-function-type]
         (IsValidSid_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'equal_sid':
C:/emacs/git/emacs/emacs-26/src/w32.c:1051:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, void *)' {aka 'int (*)(void *, void *)'} [-Wcast-function-type]
         (EqualSid_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_length_sid':
C:/emacs/git/emacs/emacs-26/src/w32.c:1075:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'DWORD (*)(void *)' {aka 'long unsigned int (*)(void *)'} [-Wcast-function-type]
         (GetLengthSid_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'copy_sid':
C:/emacs/git/emacs/emacs-26/src/w32.c:1099:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(DWORD,  void *, void *)' {aka 'int (*)(long unsigned int,  void *, void 
*)'} [-Wcast-function-type]
         (CopySid_Proc) GetProcAddress (
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_native_system_info':
C:/emacs/git/emacs/emacs-26/src/w32.c:1125:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void 
(*)(struct _SYSTEM_INFO *)' [-Wcast-function-type]
      (GetNativeSystemInfo_Proc)GetProcAddress (GetModuleHandle 
("kernel32.dll"),
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_system_times':
C:/emacs/git/emacs/emacs-26/src/w32.c:1149:2: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct _FILETIME *, struct _FILETIME *, struct _FILETIME *)' {aka 'int 
(*)(struct _FILETIME *, struct _FILETIME *, struct _FILETIME *)'} 
[-Wcast-function-type]
  (GetSystemTimes_Proc)GetProcAddress (GetModuleHandle ("kernel32.dll"),
  ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'create_symbolic_link':
C:/emacs/git/emacs/emacs-26/src/w32.c:1179:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'BOOLEAN (*)(const WCHAR *, const WCHAR *, DWORD)' {aka 'unsigned char 
(*)(const short unsigned int *, const short unsigned int *, long unsigned 
int)'} [-Wcast-function-type]
      (CreateSymbolicLinkW_Proc)GetProcAddress (GetModuleHandle 
("kernel32.dll"),
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c:1214:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'BOOLEAN (*)(const CHAR *, const CHAR *, DWORD)' {aka 'unsigned char (*)(const 
char *, const char *, long unsigned int)'} [-Wcast-function-type]
      (CreateSymbolicLinkA_Proc)GetProcAddress (GetModuleHandle 
("kernel32.dll"),
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'is_valid_security_descriptor':
C:/emacs/git/emacs/emacs-26/src/w32.c:1259:2: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *)' {aka 'int (*)(void *)'} [-Wcast-function-type]
  (IsValidSecurityDescriptor_Proc)GetProcAddress (GetModuleHandle 
("Advapi32.dll"),
  ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'convert_sd_to_sddl':
C:/emacs/git/emacs/emacs-26/src/w32.c:1296:2: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, DWORD,  SECURITY_INFORMATION,  CHAR **, ULONG *)' {aka 'int 
(*)(void *, long unsigned int,  long unsigned int,  char **, long unsigned int 
*)'} [-Wcast-function-type]
  (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)GetProcAddress 
(GetModuleHandle ("Advapi32.dll"),
  ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'convert_sddl_to_sd':
C:/emacs/git/emacs/emacs-26/src/w32.c:1339:2: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(const CHAR *, DWORD,  void **, ULONG *)' {aka 'int (*)(const char *, long 
unsigned int,  void **, long unsigned int *)'} [-Wcast-function-type]
  (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)GetProcAddress 
(GetModuleHandle ("Advapi32.dll"),
  ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_adapters_info':
C:/emacs/git/emacs/emacs-26/src/w32.c:1371:28: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'DWORD (*)(struct _IP_ADAPTER_INFO *, ULONG *)' {aka 'long unsigned int 
(*)(struct _IP_ADAPTER_INFO *, long unsigned int *)'} [-Wcast-function-type]
  s_pfn_Get_Adapters_Info = (GetAdaptersInfo_Proc)
                            ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'init_environment':
C:/emacs/git/emacs/emacs-26/src/w32.c:2730:20: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 
'HRESULT (*)(struct HWND__ *, int,  void *, DWORD,  char *)' {aka 'long int 
(*)(struct HWND__ *, int,  void *, long unsigned int,  char *)'} 
[-Wcast-function-type]
  get_folder_path = (ShGetFolderPath_fn)
                    ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'create_toolhelp32_snapshot':
C:/emacs/git/emacs/emacs-26/src/w32.c:6562:42: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void 
* (*)(DWORD,  DWORD)' {aka 'void * (*)(long unsigned int,  long unsigned int)'} 
[-Wcast-function-type]
       s_pfn_Create_Toolhelp32_Snapshot = (CreateToolhelp32Snapshot_Proc)
                                          ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'process32_first':
C:/emacs/git/emacs/emacs-26/src/w32.c:6581:31: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, PROCESSENTRY32 *)' {aka 'int (*)(void *, struct tagPROCESSENTRY32 
*)'} [-Wcast-function-type]
       s_pfn_Process32_First = (Process32First_Proc)
                               ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'process32_next':
C:/emacs/git/emacs/emacs-26/src/w32.c:6600:30: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, PROCESSENTRY32 *)' {aka 'int (*)(void *, struct tagPROCESSENTRY32 
*)'} [-Wcast-function-type]
       s_pfn_Process32_Next = (Process32Next_Proc)
                              ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'open_thread_token':
C:/emacs/git/emacs/emacs-26/src/w32.c:6629:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, DWORD,  BOOL,  void **)' {aka 'int (*)(void *, long unsigned int,  
int,  void **)'} [-Wcast-function-type]
         (OpenThreadToken_Proc) GetProcAddress (hm_advapi32, "OpenThreadToken");
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'impersonate_self':
C:/emacs/git/emacs/emacs-26/src/w32.c:6659:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(SECURITY_IMPERSONATION_LEVEL)' {aka 'int (*)(enum 
_SECURITY_IMPERSONATION_LEVEL)'} [-Wcast-function-type]
         (ImpersonateSelf_Proc) GetProcAddress (hm_advapi32, "ImpersonateSelf");
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'revert_to_self':
C:/emacs/git/emacs/emacs-26/src/w32.c:6682:9: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void)' {aka 'int (*)(void)'} [-Wcast-function-type]
         (RevertToSelf_Proc) GetProcAddress (hm_advapi32, "RevertToSelf");
         ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'get_process_memory_info':
C:/emacs/git/emacs/emacs-26/src/w32.c:6707:34: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, PROCESS_MEMORY_COUNTERS *, DWORD)' {aka 'int (*)(void *, struct 
_PROCESS_MEMORY_COUNTERS *, long unsigned int)'} [-Wcast-function-type]
  s_pfn_Get_Process_Memory_Info = (GetProcessMemoryInfo_Proc)
                                  ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 
'get_process_working_set_size':
C:/emacs/git/emacs/emacs-26/src/w32.c:6732:44: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, ULONG_PTR *, ULONG_PTR *)' {aka 'int (*)(void *, long long unsigned 
int *, long long unsigned int *)'} [-Wcast-function-type]
       s_pfn_Get_Process_Working_Set_Size = (GetProcessWorkingSetSize_Proc)
                                            ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'global_memory_status':
C:/emacs/git/emacs/emacs-26/src/w32.c:6755:36: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct _MEMORYSTATUS *)' {aka 'int (*)(struct _MEMORYSTATUS *)'} 
[-Wcast-function-type]
       s_pfn_Global_Memory_Status = (GlobalMemoryStatus_Proc)
                                    ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'global_memory_status_ex':
C:/emacs/git/emacs/emacs-26/src/w32.c:6778:39: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(struct _MEMORY_STATUS_EX *)' {aka 'int (*)(struct _MEMORY_STATUS_EX *)'} 
[-Wcast-function-type]
       s_pfn_Global_Memory_Status_Ex = (GlobalMemoryStatusEx_Proc)
                                       ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'maybe_load_unicows_dll':
C:/emacs/git/emacs/emacs-26/src/w32.c:9607:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int 
(*)(UINT,  DWORD,  const CHAR *, int,  WCHAR *, int)' {aka 'int (*)(unsigned 
int,  long unsigned int,  const char *, int,  short unsigned int *, int)'} 
[-Wcast-function-type]
      (MultiByteToWideChar_Proc)GetProcAddress (ret, "MultiByteToWideChar");
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c:9609:6: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int 
(*)(UINT,  DWORD,  const WCHAR *, int,  CHAR *, int,  const CHAR *, WINBOOL *)' 
{aka 'int (*)(unsigned int,  long unsigned int,  const short unsigned int *, 
int,  char *, int,  const char *, int *)'} [-Wcast-function-type]
      (WideCharToMultiByte_Proc)GetProcAddress (ret, "WideCharToMultiByte");
      ^
C:/emacs/git/emacs/emacs-26/src/w32.c: In function 'globals_of_w32':
C:/emacs/git/emacs/emacs-26/src/w32.c:9659:26: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, struct _FILETIME *, struct _FILETIME *, struct _FILETIME *, struct 
_FILETIME *)' {aka 'int (*)(void *, struct _FILETIME *, struct _FILETIME *, 
struct _FILETIME *, struct _FILETIME *)'} [-Wcast-function-type]
   get_process_times_fn = (GetProcessTimes_Proc)
                          ^
  CC       w32heap.o
C:/emacs/git/emacs/emacs-26/src/w32heap.c: In function 'init_heap':
C:/emacs/git/emacs/emacs-26/src/w32heap.c:284:4: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void 
* (*)(ULONG,  void *, SIZE_T,  SIZE_T,  void *, void *)' {aka 'void * (*)(long 
unsigned int,  void *, long long unsigned int,  long long unsigned int,  void 
*, void *)'} [-Wcast-function-type]
  = (RtlCreateHeap_Proc) GetProcAddress (hm_ntdll, "RtlCreateHeap");
    ^
  CC       w32proc.o
C:/emacs/git/emacs/emacs-26/src/w32proc.c: In function 'init_timers':
C:/emacs/git/emacs/emacs-26/src/w32proc.c:552:7: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *, struct _FILETIME *, struct _FILETIME *, struct _FILETIME *, struct 
_FILETIME *)' {aka 'int (*)(void *, struct _FILETIME *, struct _FILETIME *, 
struct _FILETIME *, struct _FILETIME *)'} [-Wcast-function-type]
       (GetThreadTimes_Proc)GetProcAddress (GetModuleHandle ("kernel32.dll"),
       ^
C:/emacs/git/emacs/emacs-26/src/w32proc.c: In function 'sys_kill':
C:/emacs/git/emacs/emacs-26/src/w32proc.c:2693:32: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL 
(*)(void *)' {aka 'int (*)(void *)'} [-Wcast-function-type]
    s_pfn_Debug_Break_Process = (DebugBreakProcess_Proc)
                                ^
C:/emacs/git/emacs/emacs-26/src/w32proc.c: In function 'w32_compare_strings':
C:/emacs/git/emacs/emacs-26/src/w32proc.c:3612:13: warning: cast between 
incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int 
(*)(LCID,  DWORD,  const WCHAR *, int,  const WCHAR *, int)' {aka 'int (*)(long 
unsigned int,  long unsigned int,  const short unsigned int *, int,  const 
short unsigned int *, int)'} [-Wcast-function-type]
             (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"),
             ^




reply via email to

[Prev in Thread] Current Thread [Next in Thread]