Commit e741c893 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Fix to remove compiler warnings

parent 252ba8aa
...@@ -268,7 +268,7 @@ C_MODE_END ...@@ -268,7 +268,7 @@ C_MODE_END
#endif #endif
#include <errno.h> /* Recommended by debian */ #include <errno.h> /* Recommended by debian */
/* We need the following to go around a problem with openssl on solaris */ /* We need the following to go around a problem with openssl on solaris */
#if defined(HAVE_CRYPT) #if defined(HAVE_CRYPT_H)
#include <crypt.h> #include <crypt.h>
#endif #endif
......
...@@ -148,7 +148,7 @@ my_bool vio_ssl_should_retry(Vio* vio); ...@@ -148,7 +148,7 @@ my_bool vio_ssl_should_retry(Vio* vio);
int vio_ssl_close(Vio* vio); int vio_ssl_close(Vio* vio);
/* Return last error number */ /* Return last error number */
int vio_ssl_errno(Vio *vio); int vio_ssl_errno(Vio *vio);
my_bool vio_ssl_peer_addr(Vio* vio, char *buf); my_bool vio_ssl_peer_addr(Vio* vio, char *buf, uint16 *port);
void vio_ssl_in_addr(Vio *vio, struct in_addr *in); void vio_ssl_in_addr(Vio *vio, struct in_addr *in);
int vio_ssl_blocking(Vio * vio, my_bool set_blocking_mode, my_bool *old_mode); int vio_ssl_blocking(Vio * vio, my_bool set_blocking_mode, my_bool *old_mode);
...@@ -224,7 +224,7 @@ struct st_vio ...@@ -224,7 +224,7 @@ struct st_vio
my_bool (*is_blocking)(Vio*); my_bool (*is_blocking)(Vio*);
int (*viokeepalive)(Vio*, my_bool); int (*viokeepalive)(Vio*, my_bool);
int (*fastsend)(Vio*); int (*fastsend)(Vio*);
my_bool (*peer_addr)(Vio*, gptr, uint16*); my_bool (*peer_addr)(Vio*, char *, uint16*);
void (*in_addr)(Vio*, struct in_addr*); void (*in_addr)(Vio*, struct in_addr*);
my_bool (*should_retry)(Vio*); my_bool (*should_retry)(Vio*);
int (*vioclose)(Vio*); int (*vioclose)(Vio*);
......
...@@ -62,7 +62,7 @@ my_string mysql_unix_port=0; ...@@ -62,7 +62,7 @@ my_string mysql_unix_port=0;
#define closesocket(A) close(A) #define closesocket(A) close(A)
#endif #endif
static void mysql_once_init(void); static void mysqld_once_init(void);
static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields, static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
uint field_count); uint field_count);
static int read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, static int read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row,
...@@ -729,7 +729,7 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) ...@@ -729,7 +729,7 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths)
MYSQL * STDCALL MYSQL * STDCALL
mysql_init(MYSQL *mysql) mysql_init(MYSQL *mysql)
{ {
mysql_once_init(); mysqld_once_init();
if (!mysql) if (!mysql)
{ {
if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL)))) if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL))))
...@@ -743,7 +743,7 @@ mysql_init(MYSQL *mysql) ...@@ -743,7 +743,7 @@ mysql_init(MYSQL *mysql)
} }
static void mysql_once_init() static void mysqld_once_init()
{ {
if (!mysql_client_init) if (!mysql_client_init)
{ {
......
...@@ -286,6 +286,8 @@ pthread_handler_decl(thr_find_all_keys,arg) ...@@ -286,6 +286,8 @@ pthread_handler_decl(thr_find_all_keys,arg)
uint idx, maxbuffer; uint idx, maxbuffer;
uchar **sort_keys=0; uchar **sort_keys=0;
LINT_INIT(keys);
error=1; error=1;
if (my_thread_init()) if (my_thread_init())
......
...@@ -33,7 +33,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function, ...@@ -33,7 +33,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
if (function == HA_EXTRA_CACHE) if (function == HA_EXTRA_CACHE)
{ {
info->cache_in_use=1; info->cache_in_use=1;
info->cache_size= (extra_arg ? *(long*) extra_arg : info->cache_size= (extra_arg ? *(ulong*) extra_arg :
my_default_record_cache_size); my_default_record_cache_size);
} }
else else
......
...@@ -212,13 +212,14 @@ my_socket vio_ssl_fd(Vio* vio) ...@@ -212,13 +212,14 @@ my_socket vio_ssl_fd(Vio* vio)
} }
my_bool vio_ssl_peer_addr(Vio * vio, char *buf) my_bool vio_ssl_peer_addr(Vio * vio, char *buf, uint16 *port)
{ {
DBUG_ENTER("vio_ssl_peer_addr"); DBUG_ENTER("vio_ssl_peer_addr");
DBUG_PRINT("enter", ("sd=%d", vio->sd)); DBUG_PRINT("enter", ("sd=%d", vio->sd));
if (vio->localhost) if (vio->localhost)
{ {
strmov(buf,"127.0.0.1"); strmov(buf,"127.0.0.1");
*port=0;
} }
else else
{ {
...@@ -229,8 +230,13 @@ my_bool vio_ssl_peer_addr(Vio * vio, char *buf) ...@@ -229,8 +230,13 @@ my_bool vio_ssl_peer_addr(Vio * vio, char *buf)
DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno)); DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno));
DBUG_RETURN(1); DBUG_RETURN(1);
} }
/* FIXME */ #ifdef TO_BE_FIXED
/* my_inet_ntoa(vio->remote.sin_addr,buf); */ my_inet_ntoa(vio->remote.sin_addr,buf);
*port= 0;
#else
strmov(buf, "unknown");
*port= 0;
#endif
} }
DBUG_PRINT("exit", ("addr=%s", buf)); DBUG_PRINT("exit", ("addr=%s", buf));
DBUG_RETURN(0); DBUG_RETURN(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment