Eliminate gcc -pedantic warnings.

This commit is contained in:
Andy Polyakov 2005-06-09 21:41:44 +00:00
parent 79e1dd65ab
commit 21ac2b964b
3 changed files with 18 additions and 3 deletions

View File

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

View File

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

View File

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