From 46752c37b06c83a8cbf6be887beac4092d5e3505 Mon Sep 17 00:00:00 2001 From: Pekka Sepp?nen Date: Wed, 8 May 2019 16:54:16 +0100 Subject: [PATCH] Fix compile time warning when building the linker in a MinGw32 environment using gcc 8. PR 24536 * ldbuildid.c (generate_build_id): Cast return value from GetProcAddress in order to avoid a compile time warning. --- ld/ChangeLog | 6 ++++++ ld/ldbuildid.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 325392f498f..6bdc516173a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2019-05-08 Pekka Seppänen + + PR 24536 + * ldbuildid.c (generate_build_id): Cast return value from + GetProcAddress in order to avoid a compile time warning. + 2019-05-06 Alan Modra * testsuite/ld-undefined/weak-undef.exp: Don't xfail pj. diff --git a/ld/ldbuildid.c b/ld/ldbuildid.c index 55ff3bed84d..c4ad19992b5 100644 --- a/ld/ldbuildid.c +++ b/ld/ldbuildid.c @@ -139,7 +139,7 @@ generate_build_id (bfd *abfd, if (!rpc_library) return FALSE; - uuid_create = (UuidCreateFn) GetProcAddress (rpc_library, "UuidCreate"); + uuid_create = (UuidCreateFn) (void (WINAPI *)(void)) GetProcAddress (rpc_library, "UuidCreate"); if (!uuid_create) { FreeLibrary (rpc_library); -- 2.30.2