diff options
author | unknown <monty@mashka.mysql.fi> | 2003-04-28 19:05:57 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-04-28 19:05:57 +0300 |
commit | 68faea2eaa718bf3fe46e1c3f328346f7fd92f7e (patch) | |
tree | 96d5e3ccb7f58564a76e77f8eb11b497988864dc | |
parent | 8a05f5c7f497ff483f711dee55d3a1e7f5fe7e6a (diff) | |
download | mariadb-git-68faea2eaa718bf3fe46e1c3f328346f7fd92f7e.tar.gz |
Fix to remove compiler warnings
include/my_global.h:
Fixed wrong #ifdef
include/violite.h:
Fix to remove compiler warning
libmysqld/libmysqld.c:
Fix to remove compiler warning
myisam/sort.c:
Fix to remove compiler warning
myisammrg/myrg_extra.c:
Fix to remove compiler warning
vio/viossl.c:
Fix to remove compiler warning
-rw-r--r-- | include/my_global.h | 2 | ||||
-rw-r--r-- | include/violite.h | 4 | ||||
-rw-r--r-- | libmysqld/libmysqld.c | 6 | ||||
-rw-r--r-- | myisam/sort.c | 2 | ||||
-rw-r--r-- | myisammrg/myrg_extra.c | 2 | ||||
-rw-r--r-- | vio/viossl.c | 12 |
6 files changed, 18 insertions, 10 deletions
diff --git a/include/my_global.h b/include/my_global.h index b979cd5955a..98034fc1cff 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -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 diff --git a/include/violite.h b/include/violite.h index a328e51253a..d20fab23239 100644 --- a/include/violite.h +++ b/include/violite.h @@ -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*); diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 3fba238a8bf..782731d4765 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -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) { diff --git a/myisam/sort.c b/myisam/sort.c index 224b4ad8420..95ede6ddaa1 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -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()) diff --git a/myisammrg/myrg_extra.c b/myisammrg/myrg_extra.c index d375b45df99..62cf5f01aba 100644 --- a/myisammrg/myrg_extra.c +++ b/myisammrg/myrg_extra.c @@ -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 diff --git a/vio/viossl.c b/vio/viossl.c index 0f34a45f9aa..834343a77d9 100644 --- a/vio/viossl.c +++ b/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); |