aboutsummaryrefslogtreecommitdiff
path: root/gdb/win32-nat.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2009-01-09 10:48:36 +0000
committerJoel Brobecker <brobecker@gnat.com>2009-01-09 10:48:36 +0000
commit308a8808668c1edec499d244773b86761b7c873c (patch)
tree393bc616ea50ee095299c739f426057f78751a47 /gdb/win32-nat.c
parent5851ab761bf6df68c4b82103e34d3a62874c291f (diff)
downloadgdb-308a8808668c1edec499d244773b86761b7c873c.zip
gdb-308a8808668c1edec499d244773b86761b7c873c.tar.gz
gdb-308a8808668c1edec499d244773b86761b7c873c.tar.bz2
* win32-nat.c (has_detach_ability, set_process_privilege):
Cast the result of GetProcAddress to (void *) to avoid a compilation warning.
Diffstat (limited to 'gdb/win32-nat.c')
-rw-r--r--gdb/win32-nat.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 1b15dfb..5300731 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -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;