diff options
author | Andy Moreton <andrewjmoreton@gmail.com> | 2018-08-14 13:59:08 +0100 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-08-17 17:29:10 +0300 |
commit | cc5325b0bea13bd93478fcee0b035877b3a72290 (patch) | |
tree | ac22ceea567bc70e836b61ade04de644473267cb /src/w32proc.c | |
parent | 58e5f10f884f70faea2dc577e890ccc9e8c5d0f5 (diff) | |
download | emacs-cc5325b0bea13bd93478fcee0b035877b3a72290.tar.gz |
Pacify -Wcast-function-type warnings in GCC 8.1
* src/image.c: Move attributes into DEF_DLL_FN call.
* src/dynlib.c (dynlib_addr): Use get_proc_addr.
* src/w32.h: (get_proc_addr): New function.
(LOAD_DLL_FN): Use it.
(DEF_DLL_FN): Allow function attributes after argument
list. Add function pointer type used by LOAD_DLL_FN.
* src/w32.c (open_process_token, get_token_information)
(lookup_account_sid, get_sid_sub_authority)
(get_sid_sub_authority_count, get_security_info)
(get_file_security, set_file_security)
(set_named_security_info)
(get_security_descriptor_owner, get_security_descriptor_group)
(get_security_descriptor_dacl, is_valid_sid, equal_sid)
(get_length_sid, copy_sid, get_native_system_info)
(get_system_times, create_symbolic_link)
(is_valid_security_descriptor, convert_sd_to_sddl)
(convert_sddl_to_sd, get_adapters_info, reg_open_key_ex_w)
(reg_query_value_ex_w, expand_environment_strings_w)
(init_environment, create_toolhelp32_snapshot)
(process32_first, process32_next, open_thread_token)
(impersonate_self, revert_to_self, get_process_memory_info)
(get_process_working_set_size, global_memory_status)
(global_memory_status_ex, init_winsock)
(maybe_load_unicows_dll, globals_of_w32): Use get_proc_addr.
* src/w32fns.c (setup_w32_kbdhook, Ffile_system_info)
(get_dll_version, w32_reset_stack_overflow_guard)
(w32_backtrace, globals_of_w32fns): Use get_proc_addr.
* src/w32font.c (get_outline_metrics_w, get_text_metrics_w)
(get_glyph_outline_w, get_char_width_32_w): Use get_proc_addr.
* src/w32heap.c (init_heap): Use get_proc_addr.
* src/w32menu.c (globals_of_w32menu): Use get_proc_addr.
* src/w32proc.c (init_timers, sys_kill, w32_compare_strings):
Use get_proc_addr.
* src/w32uniscribe.c (syms_of_w32uniscribe): Use get_proc_addr.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r-- | src/w32proc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/w32proc.c b/src/w32proc.c index 61ce157b558..5c2cb327495 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -548,9 +548,8 @@ init_timers (void) through a pointer. */ s_pfn_Get_Thread_Times = NULL; /* in case dumped Emacs comes with a value */ if (os_subtype != OS_9X) - s_pfn_Get_Thread_Times = - (GetThreadTimes_Proc)GetProcAddress (GetModuleHandle ("kernel32.dll"), - "GetThreadTimes"); + s_pfn_Get_Thread_Times = (GetThreadTimes_Proc) + get_proc_addr (GetModuleHandle ("kernel32.dll"), "GetThreadTimes"); /* Make sure we start with zeroed out itimer structures, since dumping may have left there traces of threads long dead. */ @@ -2691,8 +2690,8 @@ sys_kill (pid_t pid, int sig) { g_b_init_debug_break_process = 1; s_pfn_Debug_Break_Process = (DebugBreakProcess_Proc) - GetProcAddress (GetModuleHandle ("kernel32.dll"), - "DebugBreakProcess"); + get_proc_addr (GetModuleHandle ("kernel32.dll"), + "DebugBreakProcess"); } if (s_pfn_Debug_Break_Process == NULL) @@ -3608,9 +3607,9 @@ w32_compare_strings (const char *s1, const char *s2, char *locname, { if (os_subtype == OS_9X) { - pCompareStringW = - (CompareStringW_Proc) GetProcAddress (LoadLibrary ("Unicows.dll"), - "CompareStringW"); + pCompareStringW = (CompareStringW_Proc) + get_proc_addr (LoadLibrary ("Unicows.dll"), + "CompareStringW"); if (!pCompareStringW) { errno = EINVAL; |