diff options
author | Mike Hommey <mh+mozilla@glandium.org> | 2022-08-12 11:08:20 +0000 |
---|---|---|
committer | Mike Hommey <mh+mozilla@glandium.org> | 2022-08-12 11:08:20 +0000 |
commit | 78714d75487483c0a99ed30aa46538f74202923b (patch) | |
tree | 27500b48514d2e0771d06ffb078a42cc9faae24d | |
parent | 251d7c1b131640fca002fbdaae2bfd98a47e144b (diff) | |
download | nss-hg-78714d75487483c0a99ed30aa46538f74202923b.tar.gz |
Bug 1784191 - Cast the result of GetProcAddress. r=bbeurdouche,nss-reviewers
clang trunk recently added a check for incompatible function pointers,
and now is not happy with a FARPROC being given as a
PRThreadPrivateDTOR, because that's not the same signature. But FARPROC
is the "normal" return type from GetProcAddress, but OTOH, it's not the
actual type signature for PR_Free.
Differential Revision: https://phabricator.services.mozilla.com/D154337
-rw-r--r-- | lib/base/error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/base/error.c b/lib/base/error.c index 2ef032933..6cbe785c3 100644 --- a/lib/base/error.c +++ b/lib/base/error.c @@ -86,7 +86,7 @@ error_once_function(void) #if defined(__MINGW32__) HMODULE nss3 = GetModuleHandleW(L"nss3"); if (nss3) { - FARPROC freePtr = GetProcAddress(nss3, "PR_Free"); + PRThreadPrivateDTOR freePtr = (PRThreadPrivateDTOR)GetProcAddress(nss3, "PR_Free"); if (freePtr) { return PR_NewThreadPrivateIndex(&error_stack_index, freePtr); } |