mirror of https://github.com/moparisthebest/curl
Only declare static variables if they're needed. Fixed some compile warnings.
This commit is contained in:
parent
10d6d8b2ae
commit
f23d923fd3
|
@ -107,10 +107,12 @@ typedef void * (*dynafunc)(void *input);
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*/
|
*/
|
||||||
|
#if defined(HAVE_DLOPEN) || defined(HAVE_LIBDL) || defined(WIN32)
|
||||||
static void *libldap = NULL;
|
static void *libldap = NULL;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
static void *liblber = NULL;
|
static void *liblber = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static int DynaOpen(const char **mod_name)
|
static int DynaOpen(const char **mod_name)
|
||||||
{
|
{
|
||||||
|
@ -140,6 +142,7 @@ static int DynaOpen(const char **mod_name)
|
||||||
return (libldap != NULL);
|
return (libldap != NULL);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
(void) mod_name;
|
||||||
return (0);
|
return (0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -179,6 +182,8 @@ static dynafunc DynaGetFunction(const char *name)
|
||||||
if (libldap) {
|
if (libldap) {
|
||||||
func = (dynafunc)GetProcAddress((HINSTANCE)libldap, name);
|
func = (dynafunc)GetProcAddress((HINSTANCE)libldap, name);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void) name;
|
||||||
#endif
|
#endif
|
||||||
return func;
|
return func;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue