summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/resolveip.c5
-rw-r--r--innobase/os/os0file.c13
-rw-r--r--innobase/ut/ut0mem.c4
-rw-r--r--isam/create.c5
-rw-r--r--isam/pack_isam.c2
-rw-r--r--libmysql/violite.c4
-rw-r--r--myisam/mi_log.c2
-rw-r--r--myisam/myisampack.c3
-rw-r--r--mysys/mf_cache.c3
-rw-r--r--readline/vi_mode.c2
-rw-r--r--sql/ha_innobase.cc2
-rw-r--r--sql/violite.c4
-rw-r--r--strings/t_ctype.h8
13 files changed, 38 insertions, 19 deletions
diff --git a/extra/resolveip.c b/extra/resolveip.c
index d739f8de244..a75c7ecc97a 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -20,6 +20,9 @@
#define RESOLVE_VERSION "2.0"
#include <global.h>
+#include <m_ctype.h>
+#include <my_sys.h>
+#include <m_string.h>
#include <sys/types.h>
#include <sys/socket.h>
#ifndef HAVE_BROKEN_NETINET_INCLUDES
@@ -27,8 +30,6 @@
#endif
#include <arpa/inet.h>
#include <netdb.h>
-#include <m_ctype.h>
-#include <my_sys.h>
#include <getopt.h>
#if !defined(_AIX) && !defined(HAVE_UNIXWARE7_THREADS) && !defined(HAVE_UNIXWARE7_POSIX) && !defined(h_errno)
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 60d65186e11..9fecf2c04fd 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -817,7 +817,9 @@ try_again:
return(TRUE);
}
#endif
+#ifdef __WIN__
error_handling:
+#endif
retry = os_file_handle_error(file, NULL);
if (retry) {
@@ -906,7 +908,9 @@ try_again:
return(TRUE);
}
#endif
+#ifdef __WIN__
error_handling:
+#endif
retry = os_file_handle_error(file, name);
if (retry) {
@@ -1150,6 +1154,8 @@ os_aio_get_array_and_local_segment(
/***********************************************************************
Gets an integer value designating a specified aio array. This is used
to give numbers to signals in Posix aio. */
+
+#if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO)
static
ulint
os_aio_get_array_no(
@@ -1203,6 +1209,7 @@ os_aio_get_array_from_no(
return(NULL);
}
}
+#endif /* if !defined(WIN_ASYNC_IO) && defined(POSIX_ASYNC_IO) */
/***********************************************************************
Requests for a slot in the aio array. If no slot is available, waits until
@@ -1955,7 +1962,7 @@ consecutive_loop:
}
}
- srv_io_thread_op_info[global_segment] = "doing file i/o";
+ srv_io_thread_op_info[global_segment] = (char*) "doing file i/o";
/* Do the i/o with ordinary, synchronous i/o functions: */
if (slot->type == OS_FILE_WRITE) {
@@ -1967,7 +1974,7 @@ consecutive_loop:
}
ut_a(ret);
- srv_io_thread_op_info[global_segment] = "file i/o done";
+ srv_io_thread_op_info[global_segment] = (char*) "file i/o done";
/* printf("aio: %lu consecutive %lu:th segment, first offs %lu blocks\n",
n_consecutive, global_segment, slot->offset
@@ -2024,7 +2031,7 @@ wait_for_io:
os_mutex_exit(array->mutex);
- srv_io_thread_op_info[global_segment] = "waiting for i/o request";
+ srv_io_thread_op_info[global_segment] = (char*) "waiting for i/o request";
os_event_wait(os_aio_segment_wait_events[global_segment]);
diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c
index 630bd3a9b71..84a79d39556 100644
--- a/innobase/ut/ut0mem.c
+++ b/innobase/ut/ut0mem.c
@@ -78,7 +78,7 @@ ut_malloc_low(
fprintf(stderr,
"InnoDB: Fatal error: cannot allocate %lu bytes of\n"
"InnoDB: memory with malloc! Total allocated memory\n"
- "InnoDB: by InnoDB %lu bytes. Operating system errno: %lu\n"
+ "InnoDB: by InnoDB %lu bytes. Operating system errno: %d\n"
"InnoDB: Cannot continue operation!\n"
"InnoDB: Check if you should increase the swap file or\n"
"InnoDB: ulimits of your operating system.\n",
@@ -155,7 +155,7 @@ ut_free_all_mem(void)
os_fast_mutex_lock(&ut_list_mutex);
- while (block = UT_LIST_GET_FIRST(ut_mem_block_list)) {
+ while ((block = UT_LIST_GET_FIRST(ut_mem_block_list))) {
ut_a(block->magic_n == UT_MEM_MAGIC_N);
ut_a(ut_total_allocated_memory >= block->size);
diff --git a/isam/create.c b/isam/create.c
index c59b20d8b0c..fcf54ddc731 100644
--- a/isam/create.c
+++ b/isam/create.c
@@ -259,8 +259,9 @@ int nisam_create(const char *name,uint keys,N_KEYDEF *keyinfo,
(pointer == 3 && reclength >= 256L) ? (ulong) NI_POS_ERROR :
((ulong) reclength * (1L << (pointer*8)));
share.base.max_key_file_length= (share.base.key_reflength == 3 ?
- NI_POS_ERROR :
- (1L << (share.base.key_reflength*8))*512);
+ NI_POS_ERROR :
+ (ulong)
+ (1L << (share.base.key_reflength*8))*512);
share.base.min_block_length=
(share.base.pack_reclength+3 < N_EXTEND_BLOCK_LENGTH &&
! share.base.blobs) ?
diff --git a/isam/pack_isam.c b/isam/pack_isam.c
index c2cbb72cf74..3d8512847ae 100644
--- a/isam/pack_isam.c
+++ b/isam/pack_isam.c
@@ -288,7 +288,7 @@ static void usage(void)
-?, --help display this help and exit\n\
-V, --version output version information and exit\n");
print_defaults("my",load_default_groups);
-};
+}
/* reads options */
/* Initiates DEBUG - but no debugging here ! */
diff --git a/libmysql/violite.c b/libmysql/violite.c
index 932861b10c2..37fee6fad3d 100644
--- a/libmysql/violite.c
+++ b/libmysql/violite.c
@@ -38,8 +38,12 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
#if !defined(MSDOS) && !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__FreeBSD__)
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
#if !defined(alpha_linux_port)
#include <netinet/tcp.h>
diff --git a/myisam/mi_log.c b/myisam/mi_log.c
index 2d00387a945..5c64c130212 100644
--- a/myisam/mi_log.c
+++ b/myisam/mi_log.c
@@ -33,7 +33,7 @@
#undef GETPID /* For HPUX */
#ifdef THREAD
-#define GETPID() (log_type == 1 ? myisam_pid : (long) my_thread_id());
+#define GETPID() (log_type == 1 ? (long) myisam_pid : (long) my_thread_id());
#else
#define GETPID() myisam_pid
#endif
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index 1aee5f20fa8..7ee0ff61204 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -893,7 +893,8 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
DBUG_RETURN(error != HA_ERR_END_OF_FILE);
}
-static int compare_huff_elements(void *not_used, byte *a, byte *b)
+static int compare_huff_elements(void *not_used __attribute__((unused)),
+ byte *a, byte *b)
{
return *((my_off_t*) a) < *((my_off_t*) b) ? -1 :
(*((my_off_t*) a) == *((my_off_t*) b) ? 0 : 1);
diff --git a/mysys/mf_cache.c b/mysys/mf_cache.c
index 8d6eda8305a..85b6b19b328 100644
--- a/mysys/mf_cache.c
+++ b/mysys/mf_cache.c
@@ -28,7 +28,8 @@
this, just remember the file name for later removal
*/
-static my_bool cache_remove_open_tmp(IO_CACHE *cache, const char *name)
+static my_bool cache_remove_open_tmp(IO_CACHE *cache __attribute__((unused)),
+ const char *name)
{
#if O_TEMPORARY == 0
#if !defined(CANT_DELETE_OPEN_FILES)
diff --git a/readline/vi_mode.c b/readline/vi_mode.c
index d4868bf3b13..2a4f11d28a4 100644
--- a/readline/vi_mode.c
+++ b/readline/vi_mode.c
@@ -138,7 +138,7 @@ _rl_vi_initialize_line ()
{
register int i;
- for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++)
+ for (i = 0; i < (int) sizeof (vi_mark_chars) / sizeof (int); i++)
vi_mark_chars[i] = -1;
}
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index 8e3a66882ca..25c7757259a 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -230,7 +230,7 @@ innobase_mysql_print_thd(
}
if (thd->query) {
- printf("\n%0.100s", thd->query);
+ printf("\n%.100s", thd->query);
}
printf("\n");
diff --git a/sql/violite.c b/sql/violite.c
index 932861b10c2..37fee6fad3d 100644
--- a/sql/violite.c
+++ b/sql/violite.c
@@ -38,8 +38,12 @@
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
#if !defined(MSDOS) && !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__FreeBSD__)
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
#if !defined(alpha_linux_port)
#include <netinet/tcp.h>
diff --git a/strings/t_ctype.h b/strings/t_ctype.h
index 6aca3fa911c..6699244c1f4 100644
--- a/strings/t_ctype.h
+++ b/strings/t_ctype.h
@@ -123,7 +123,7 @@ enum l1_symbols {
L1_SARA_AE,
L1_SARA_O,
L1_SARA_AI_MAIMUAN,
- L1_SARA_AI_MAIMALAI,
+ L1_SARA_AI_MAIMALAI
};
// level 2 symbols & order
@@ -137,7 +137,7 @@ enum l2_symbols {
L2_TONE1,
L2_TONE2,
L2_TONE3,
- L2_TONE4,
+ L2_TONE4
};
// level 3 symbols & order
@@ -182,7 +182,7 @@ enum l3_symbols {
L3_LESS_THAN,
L3_EQUAL,
L3_GREATER_THAN,
- L3_V_LINE,
+ L3_V_LINE
};
// level 4 symbols & order
@@ -190,7 +190,7 @@ enum l4_symbols {
L4_BLANK = TOT_LEVELS,
L4_MIN,
L4_CAP,
- L4_EXT,
+ L4_EXT
};
enum level_symbols {