mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
* win32-nat.c (has_detach_ability, set_process_privilege):
Cast the result of GetProcAddress to (void *) to avoid a compilation warning.
This commit is contained in:
parent
5851ab761b
commit
308a880866
@ -1,3 +1,9 @@
|
||||
2009-01-09 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* win32-nat.c (has_detach_ability, set_process_privilege):
|
||||
Cast the result of GetProcAddress to (void *) to avoid
|
||||
a compilation warning.
|
||||
|
||||
2009-01-09 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
|
||||
|
@ -1600,11 +1600,11 @@ has_detach_ability (void)
|
||||
if (kernel32)
|
||||
{
|
||||
if (!kernel32_DebugSetProcessKillOnExit)
|
||||
kernel32_DebugSetProcessKillOnExit = GetProcAddress (kernel32,
|
||||
"DebugSetProcessKillOnExit");
|
||||
kernel32_DebugSetProcessKillOnExit =
|
||||
(void *) GetProcAddress (kernel32, "DebugSetProcessKillOnExit");
|
||||
if (!kernel32_DebugActiveProcessStop)
|
||||
kernel32_DebugActiveProcessStop = GetProcAddress (kernel32,
|
||||
"DebugActiveProcessStop");
|
||||
kernel32_DebugActiveProcessStop =
|
||||
(void *) GetProcAddress (kernel32, "DebugActiveProcessStop");
|
||||
if (kernel32_DebugSetProcessKillOnExit
|
||||
&& kernel32_DebugActiveProcessStop)
|
||||
return 1;
|
||||
@ -1641,13 +1641,14 @@ set_process_privilege (const char *privilege, BOOL enable)
|
||||
if (!(advapi32 = LoadLibrary ("advapi32.dll")))
|
||||
goto out;
|
||||
if (!OpenProcessToken)
|
||||
OpenProcessToken = GetProcAddress (advapi32, "OpenProcessToken");
|
||||
OpenProcessToken =
|
||||
(void *) GetProcAddress (advapi32, "OpenProcessToken");
|
||||
if (!LookupPrivilegeValue)
|
||||
LookupPrivilegeValue = GetProcAddress (advapi32,
|
||||
"LookupPrivilegeValueA");
|
||||
LookupPrivilegeValue =
|
||||
(void *) GetProcAddress (advapi32, "LookupPrivilegeValueA");
|
||||
if (!AdjustTokenPrivileges)
|
||||
AdjustTokenPrivileges = GetProcAddress (advapi32,
|
||||
"AdjustTokenPrivileges");
|
||||
AdjustTokenPrivileges =
|
||||
(void *) GetProcAddress (advapi32, "AdjustTokenPrivileges");
|
||||
if (!OpenProcessToken || !LookupPrivilegeValue || !AdjustTokenPrivileges)
|
||||
{
|
||||
advapi32 = NULL;
|
||||
|
@ -1600,11 +1600,11 @@ has_detach_ability (void)
|
||||
if (kernel32)
|
||||
{
|
||||
if (!kernel32_DebugSetProcessKillOnExit)
|
||||
kernel32_DebugSetProcessKillOnExit = GetProcAddress (kernel32,
|
||||
"DebugSetProcessKillOnExit");
|
||||
kernel32_DebugSetProcessKillOnExit =
|
||||
(void *) GetProcAddress (kernel32, "DebugSetProcessKillOnExit");
|
||||
if (!kernel32_DebugActiveProcessStop)
|
||||
kernel32_DebugActiveProcessStop = GetProcAddress (kernel32,
|
||||
"DebugActiveProcessStop");
|
||||
kernel32_DebugActiveProcessStop =
|
||||
(void *) GetProcAddress (kernel32, "DebugActiveProcessStop");
|
||||
if (kernel32_DebugSetProcessKillOnExit
|
||||
&& kernel32_DebugActiveProcessStop)
|
||||
return 1;
|
||||
@ -1641,13 +1641,14 @@ set_process_privilege (const char *privilege, BOOL enable)
|
||||
if (!(advapi32 = LoadLibrary ("advapi32.dll")))
|
||||
goto out;
|
||||
if (!OpenProcessToken)
|
||||
OpenProcessToken = GetProcAddress (advapi32, "OpenProcessToken");
|
||||
OpenProcessToken =
|
||||
(void *) GetProcAddress (advapi32, "OpenProcessToken");
|
||||
if (!LookupPrivilegeValue)
|
||||
LookupPrivilegeValue = GetProcAddress (advapi32,
|
||||
"LookupPrivilegeValueA");
|
||||
LookupPrivilegeValue =
|
||||
(void *) GetProcAddress (advapi32, "LookupPrivilegeValueA");
|
||||
if (!AdjustTokenPrivileges)
|
||||
AdjustTokenPrivileges = GetProcAddress (advapi32,
|
||||
"AdjustTokenPrivileges");
|
||||
AdjustTokenPrivileges =
|
||||
(void *) GetProcAddress (advapi32, "AdjustTokenPrivileges");
|
||||
if (!OpenProcessToken || !LookupPrivilegeValue || !AdjustTokenPrivileges)
|
||||
{
|
||||
advapi32 = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user