From: Andy Polyakov Date: Thu, 9 Jun 2005 21:41:44 +0000 (+0000) Subject: Eliminate gcc -pedantic warnings. X-Git-Tag: OpenSSL_0_9_8k^2~2025 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21ac2b964bafe37eff49c9d96a62af84d9345fd4;p=oweals%2Fopenssl.git Eliminate gcc -pedantic warnings. --- diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 4d599246c8..dccb8e7ee8 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -357,7 +357,12 @@ static int dl_pathbyaddr(void *addr,char *path,int sz) struct shl_descriptor inf; int i,len; - if (addr == NULL) addr = dl_pathbyaddr; + if (addr == NULL) + { + union { int(*f)(void*,char*,int); void *p; } t = + { dl_pathbyaddr }; + addr = t.p; + } for (i=-1;shl_get_r(i,&inf)==0;i++) { diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index 56756cf541..76630d865e 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -423,7 +423,12 @@ static int dlfcn_pathbyaddr(void *addr,char *path,int sz) Dl_info dli; int len; - if (addr == NULL) addr = dlfcn_pathbyaddr; + if (addr == NULL) + { + union { int(*f)(void*,char*,int); void *p; } t = + { dlfcn_pathbyaddr }; + addr = t.p; + } if (dladdr(addr,&dli)) { diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 96ccd4b7ee..317606ac5b 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -635,7 +635,12 @@ static int win32_pathbyaddr(void *addr,char *path,int sz) MODULE32 module_first, module_next; int len; - if (addr == NULL) addr = win32_pathbyaddr; + if (addr == NULL) + { + union { int(*f)(void*,char*,int); void *p; } t = + { win32_pathbyaddr }; + addr = t.p; + } dll = LoadLibrary(TEXT(DLLNAME)); if (dll == NULL)