ERR: Attempt to fix more Curl warnings
This commit is contained in:
parent
f5cf6676a7
commit
bf91178565
@ -1796,7 +1796,7 @@ LookupWord (yylval, buff)
|
|||||||
/* Make it lowercase. */
|
/* Make it lowercase. */
|
||||||
for (p = buff; *p; p++)
|
for (p = buff; *p; p++)
|
||||||
if (ISUPPER ((unsigned int)(*p)))
|
if (ISUPPER ((unsigned int)(*p)))
|
||||||
*p = (char)tolower (*p);
|
*p = (char)tolower ((unsigned int)(*p));
|
||||||
|
|
||||||
if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
|
if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0)
|
||||||
{
|
{
|
||||||
|
@ -474,11 +474,11 @@ static struct hostent* pack_hostent(char** buf, struct hostent* orig)
|
|||||||
|
|
||||||
/* now, shrink the allocated buffer to the size we actually need, which
|
/* now, shrink the allocated buffer to the size we actually need, which
|
||||||
most often is only a fraction of the original alloc */
|
most often is only a fraction of the original alloc */
|
||||||
newbuf=(struct hostent *)realloc(*buf, (int)bufptr-(int)(*buf));
|
newbuf=(struct hostent *)realloc(*buf, (int)(bufptr-*buf));
|
||||||
|
|
||||||
/* if the alloc moved, we need to adjust things again */
|
/* if the alloc moved, we need to adjust things again */
|
||||||
if((char*)newbuf != *buf)
|
if((char*)newbuf != *buf)
|
||||||
hostcache_fixoffset((struct hostent*)newbuf, (int)newbuf-(int)*buf);
|
hostcache_fixoffset((struct hostent*)newbuf, (int)((char*)newbuf-*buf));
|
||||||
|
|
||||||
/* setup the return */
|
/* setup the return */
|
||||||
*buf = (char*)newbuf;
|
*buf = (char*)newbuf;
|
||||||
|
@ -54,11 +54,14 @@
|
|||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
|
|
||||||
#define DYNA_GET_FUNCTION(type, fnc) \
|
#define DYNA_GET_FUNCTION(type, fnc) \
|
||||||
(fnc) = (type)DynaGetFunction(#fnc); \
|
{ \
|
||||||
if ((fnc) == NULL) { \
|
void* dyna_get_res = DynaGetFunction(#fnc); \
|
||||||
return CURLE_FUNCTION_NOT_FOUND; \
|
(fnc) = *((type)&dyna_get_res); \
|
||||||
} \
|
if ((fnc) == NULL) { \
|
||||||
|
return CURLE_FUNCTION_NOT_FOUND; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*/
|
*/
|
||||||
@ -163,15 +166,15 @@ CURLcode Curl_ldap(struct connectdata *conn)
|
|||||||
/* The types are needed because ANSI C distinguishes between
|
/* The types are needed because ANSI C distinguishes between
|
||||||
* pointer-to-object (data) and pointer-to-function.
|
* pointer-to-object (data) and pointer-to-function.
|
||||||
*/
|
*/
|
||||||
DYNA_GET_FUNCTION(void *(*)(char *, int), ldap_open);
|
DYNA_GET_FUNCTION(void *(**)(char *, int), ldap_open);
|
||||||
DYNA_GET_FUNCTION(int (*)(void *, char *, char *), ldap_simple_bind_s);
|
DYNA_GET_FUNCTION(int (**)(void *, char *, char *), ldap_simple_bind_s);
|
||||||
DYNA_GET_FUNCTION(int (*)(void *), ldap_unbind_s);
|
DYNA_GET_FUNCTION(int (**)(void *), ldap_unbind_s);
|
||||||
DYNA_GET_FUNCTION(int (*)(void *, char *, int, void **), ldap_url_search_s);
|
DYNA_GET_FUNCTION(int (**)(void *, char *, int, void **), ldap_url_search_s);
|
||||||
DYNA_GET_FUNCTION(void *(*)(void *, void *), ldap_first_entry);
|
DYNA_GET_FUNCTION(void *(**)(void *, void *), ldap_first_entry);
|
||||||
DYNA_GET_FUNCTION(void *(*)(void *, void *), ldap_next_entry);
|
DYNA_GET_FUNCTION(void *(**)(void *, void *), ldap_next_entry);
|
||||||
DYNA_GET_FUNCTION(char *(*)(int), ldap_err2string);
|
DYNA_GET_FUNCTION(char *(**)(int), ldap_err2string);
|
||||||
DYNA_GET_FUNCTION(int (*)(void *, char *, void *, void *, char **, char **, int (*)(void *, char *, int), void *, char *, int, unsigned long), ldap_entry2text);
|
DYNA_GET_FUNCTION(int (**)(void *, char *, void *, void *, char **, char **, int (*)(void *, char *, int), void *, char *, int, unsigned long), ldap_entry2text);
|
||||||
DYNA_GET_FUNCTION(int (*)(void *, char *, void *, void *, char **, char **, int (*)(void *, char *, int), void *, char *, int, unsigned long, char *, char *), ldap_entry2html);
|
DYNA_GET_FUNCTION(int (**)(void *, char *, void *, void *, char **, char **, int (*)(void *, char *, int), void *, char *, int, unsigned long, char *, char *), ldap_entry2html);
|
||||||
|
|
||||||
server = ldap_open(conn->hostname, conn->port);
|
server = ldap_open(conn->hostname, conn->port);
|
||||||
if (server == NULL) {
|
if (server == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user