[C++/mingw] gdb-dlfcn.c casts
authorPedro Alves <palves@redhat.com>
Tue, 17 Nov 2015 15:17:44 +0000 (15:17 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 17 Nov 2015 15:18:58 +0000 (15:18 +0000)
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-17  Pedro Alves  <palves@redhat.com>

* gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
HMODULE.

gdb/ChangeLog
gdb/gdb-dlfcn.c

index 6549badec1d6b52c9aa645af1595c2f7fd20cb94..a3bc676af76e62e944aa45277ea02456126fa5b5 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-17  Pedro Alves  <palves@redhat.com>
+
+       * gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to
+       HMODULE.
+
 2015-11-17  Pedro Alves  <palves@redhat.com>
 
        * exec.c (exec_file_attach, symfile_bfd_open) [__GO32__ || _WIN32
index fb6dc5fd595cacba2e4849534c421fbf1b1acf20..fbd3a499008bcac6809499a302817a531efb27c2 100644 (file)
@@ -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
 }
 
This page took 0.031004 seconds and 4 git commands to generate.