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/dynlib.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/dynlib.c')
-rw-r--r-- | src/dynlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dynlib.c b/src/dynlib.c index 53afdafa2dc..d40aa67f416 100644 --- a/src/dynlib.c +++ b/src/dynlib.c @@ -156,9 +156,8 @@ dynlib_addr (void *addr, const char **fname, const char **symname) address we pass to it is not an address of a string, but an address of a function. So we don't care about the Unicode version. */ - s_pfn_Get_Module_HandleExA = - (GetModuleHandleExA_Proc) GetProcAddress (hm_kernel32, - "GetModuleHandleExA"); + s_pfn_Get_Module_HandleExA = (GetModuleHandleExA_Proc) + get_proc_addr (hm_kernel32, "GetModuleHandleExA"); } if (s_pfn_Get_Module_HandleExA) { |