Eliminate gcc -pedantic warnings.
authorAndy Polyakov <appro@openssl.org>
Thu, 9 Jun 2005 21:41:44 +0000 (21:41 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 9 Jun 2005 21:41:44 +0000 (21:41 +0000)
crypto/dso/dso_dl.c
crypto/dso/dso_dlfcn.c
crypto/dso/dso_win32.c

index 4d59924..dccb8e7 100644 (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++)
                {
index 56756cf..76630d8 100644 (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))
                {
index 96ccd4b..317606a 100644 (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)