Eliminate gcc -pedantic warnings.

This commit is contained in:
Andy Polyakov 2005-06-09 21:37:30 +00:00
parent 098927c384
commit b00f715c96
2 changed files with 10 additions and 2 deletions

View File

@ -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++)
{

View File

@ -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))
{