]> granicus.if.org Git - curl/commitdiff
Only declare static variables if they're needed. Fixed some compile warnings.
authorDan Fandrich <dan@coneharvesters.com>
Tue, 14 Dec 2004 20:44:36 +0000 (20:44 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 14 Dec 2004 20:44:36 +0000 (20:44 +0000)
lib/ldap.c

index c6f7e5490da8cbc31b39f864ca2d3e1e869131c8..5646baee89fe1f9904ba7d1097edfbfde1400081 100644 (file)
@@ -107,10 +107,12 @@ typedef void * (*dynafunc)(void *input);
 
 /***********************************************************************
  */
+#if defined(HAVE_DLOPEN) || defined(HAVE_LIBDL) || defined(WIN32)
 static void *libldap = NULL;
 #ifndef WIN32
 static void *liblber = NULL;
 #endif
+#endif
 
 static int DynaOpen(const char **mod_name)
 {
@@ -140,6 +142,7 @@ static int DynaOpen(const char **mod_name)
   return (libldap != NULL);
 
 #else
+  (void) mod_name;
   return (0);
 #endif
 }
@@ -179,6 +182,8 @@ static dynafunc DynaGetFunction(const char *name)
   if (libldap) {
     func = (dynafunc)GetProcAddress((HINSTANCE)libldap, name);
   }
+#else
+  (void) name;
 #endif
   return func;
 }