This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 03/11] [C++/mingw] gdb-dlfcn.c casts
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 2 Nov 2015 19:36:02 +0000
- Subject: [PATCH 03/11] [C++/mingw] gdb-dlfcn.c casts
- Authentication-results: sourceware.org; auth=none
- References: <1446492970-21432-1-git-send-email-palves at redhat dot com>
Fixes:
../../src/gdb/gdb-dlfcn.c: In function 'void* gdb_dlsym(void*, const char*)':
../../src/gdb/gdb-dlfcn.c:105:49: error: invalid conversion from 'void*' to 'HMODULE {aka HINSTANCE__*}' [-fpermissive]
return (void *) GetProcAddress (handle, symbol);
^
gdb/ChangeLog:
2015-11-01 Pedro Alves <palves@redhat.com>
* gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
HMODULE.
---
gdb/gdb-dlfcn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/gdb-dlfcn.c b/gdb/gdb-dlfcn.c
index fb6dc5f..fbd3a49 100644
--- a/gdb/gdb-dlfcn.c
+++ b/gdb/gdb-dlfcn.c
@@ -102,7 +102,7 @@ gdb_dlsym (void *handle, const char *symbol)
#ifdef HAVE_DLFCN_H
return dlsym (handle, symbol);
#elif __MINGW32__
- return (void *) GetProcAddress (handle, symbol);
+ return (void *) GetProcAddress ((HMODULE) handle, symbol);
#endif
}
@@ -112,7 +112,7 @@ gdb_dlclose (void *handle)
#ifdef HAVE_DLFCN_H
return dlclose (handle);
#elif __MINGW32__
- return !((int) FreeLibrary (handle));
+ return !((int) FreeLibrary ((HMODULE) handle));
#endif
}
--
1.9.3