Eliminate gcc -pedantic warnings.
This commit is contained in:
parent
098927c384
commit
b00f715c96
@ -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++)
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user