mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fix to remove compiler warnings
This commit is contained in:
parent
252ba8aa61
commit
e741c893ea
6 changed files with 18 additions and 10 deletions
|
@ -268,7 +268,7 @@ C_MODE_END
|
|||
#endif
|
||||
#include <errno.h> /* Recommended by debian */
|
||||
/* 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>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ my_bool vio_ssl_should_retry(Vio* vio);
|
|||
int vio_ssl_close(Vio* vio);
|
||||
/* Return last error number */
|
||||
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);
|
||||
int vio_ssl_blocking(Vio * vio, my_bool set_blocking_mode, my_bool *old_mode);
|
||||
|
||||
|
@ -224,7 +224,7 @@ struct st_vio
|
|||
my_bool (*is_blocking)(Vio*);
|
||||
int (*viokeepalive)(Vio*, my_bool);
|
||||
int (*fastsend)(Vio*);
|
||||
my_bool (*peer_addr)(Vio*, gptr, uint16*);
|
||||
my_bool (*peer_addr)(Vio*, char *, uint16*);
|
||||
void (*in_addr)(Vio*, struct in_addr*);
|
||||
my_bool (*should_retry)(Vio*);
|
||||
int (*vioclose)(Vio*);
|
||||
|
|
|
@ -62,7 +62,7 @@ my_string mysql_unix_port=0;
|
|||
#define closesocket(A) close(A)
|
||||
#endif
|
||||
|
||||
static void mysql_once_init(void);
|
||||
static void mysqld_once_init(void);
|
||||
static MYSQL_DATA *read_rows (MYSQL *mysql,MYSQL_FIELD *fields,
|
||||
uint field_count);
|
||||
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)
|
|||
MYSQL * STDCALL
|
||||
mysql_init(MYSQL *mysql)
|
||||
{
|
||||
mysql_once_init();
|
||||
mysqld_once_init();
|
||||
if (!mysql)
|
||||
{
|
||||
if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL))))
|
||||
|
@ -743,7 +743,7 @@ mysql_init(MYSQL *mysql)
|
|||
}
|
||||
|
||||
|
||||
static void mysql_once_init()
|
||||
static void mysqld_once_init()
|
||||
{
|
||||
if (!mysql_client_init)
|
||||
{
|
||||
|
|
|
@ -286,6 +286,8 @@ pthread_handler_decl(thr_find_all_keys,arg)
|
|||
uint idx, maxbuffer;
|
||||
uchar **sort_keys=0;
|
||||
|
||||
LINT_INIT(keys);
|
||||
|
||||
error=1;
|
||||
|
||||
if (my_thread_init())
|
||||
|
|
|
@ -33,7 +33,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
|
|||
if (function == HA_EXTRA_CACHE)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
|
|
12
vio/viossl.c
12
vio/viossl.c
|
@ -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_PRINT("enter", ("sd=%d", vio->sd));
|
||||
if (vio->localhost)
|
||||
{
|
||||
strmov(buf,"127.0.0.1");
|
||||
*port=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -229,8 +230,13 @@ my_bool vio_ssl_peer_addr(Vio * vio, char *buf)
|
|||
DBUG_PRINT("exit", ("getpeername, error: %d", socket_errno));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
/* FIXME */
|
||||
/* my_inet_ntoa(vio->remote.sin_addr,buf); */
|
||||
#ifdef TO_BE_FIXED
|
||||
my_inet_ntoa(vio->remote.sin_addr,buf);
|
||||
*port= 0;
|
||||
#else
|
||||
strmov(buf, "unknown");
|
||||
*port= 0;
|
||||
#endif
|
||||
}
|
||||
DBUG_PRINT("exit", ("addr=%s", buf));
|
||||
DBUG_RETURN(0);
|
||||
|
|
Loading…
Reference in a new issue