From patchwork Mon Nov 2 19:36:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 9503 Received: (qmail 20388 invoked by alias); 2 Nov 2015 19:36:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20308 invoked by uid 89); 2 Nov 2015 19:36:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 02 Nov 2015 19:36:16 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 2B0F78C1D2 for ; Mon, 2 Nov 2015 19:36:15 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA2JaAPu009459 for ; Mon, 2 Nov 2015 14:36:14 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 03/11] [C++/mingw] gdb-dlfcn.c casts Date: Mon, 2 Nov 2015 19:36:02 +0000 Message-Id: <1446492970-21432-4-git-send-email-palves@redhat.com> In-Reply-To: <1446492970-21432-1-git-send-email-palves@redhat.com> References: <1446492970-21432-1-git-send-email-palves@redhat.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 * 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 }