diff options
author | Joel Brobecker <brobecker@gnat.com> | 2009-01-09 10:48:36 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2009-01-09 10:48:36 +0000 |
commit | 308a8808668c1edec499d244773b86761b7c873c (patch) | |
tree | 393bc616ea50ee095299c739f426057f78751a47 /gdb | |
parent | 5851ab761bf6df68c4b82103e34d3a62874c291f (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/win32-nat.c | 19 | ||||
-rw-r--r-- | gdb/windows-nat.c | 19 |
3 files changed, 26 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d05370f..8015767 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 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 already defined. 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; diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 1b15dfb..5300731 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-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; |