From b00f715c9624a915ed306194e97e65f9183b86fd Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Thu, 9 Jun 2005 21:37:30 +0000 Subject: [PATCH] Eliminate gcc -pedantic warnings. --- crypto/dso/dso_dl.c | 6 +++++- crypto/dso/dso_dlfcn.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c index 0c6e7c9f8..f7b4dfc0c 100644 --- a/crypto/dso/dso_dl.c +++ b/crypto/dso/dso_dl.c @@ -290,7 +290,11 @@ int DSO_pathbyaddr(void *addr,char *path,int sz) struct shl_descriptor inf; int i,len; - if (addr == NULL) addr = dl_ref_point; + if (addr == NULL) + { + union { void(*f)(); void *p; } t = { dl_ref_point }; + 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 d7d40ce32..0422a4859 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -302,7 +302,11 @@ int DSO_pathbyaddr(void *addr,char *path,int sz) Dl_info dli; int len; - if (addr == NULL) addr = dlfcn_ref_point; + if (addr == NULL) + { + union { void(*f)(void); void *p; } t = { dlfcn_ref_point }; + addr = t.p; + } if (dladdr(addr,&dli)) {