Commit 7189f09a authored by Sergei Golubchik's avatar Sergei Golubchik

compiler warnings/errors

parent feba65a5
......@@ -4427,7 +4427,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
{
MYSQL_ROW row;
MYSQL_RES *master;
MYSQL_RES *UNINIT_VAR(master);
char binlog_pos_file[FN_REFLEN];
char binlog_pos_offset[LONGLONG_LEN+1];
char *file, *offset;
......
......@@ -8137,8 +8137,8 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
char *re_eprint(int err)
{
static char epbuf[100];
size_t len= my_regerror(REG_ITOA|err, (my_regex_t *)NULL,
epbuf, sizeof(epbuf));
size_t len __attribute__((unused))=
my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf));
assert(len <= sizeof(epbuf));
return(epbuf);
}
......
# ulong global
--source include/have_debug.inc
SET @start_global_value = @@global.debug_binlog_fsync_sleep;
#
......
......@@ -70,6 +70,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${LIBNSL} ${LIBM} ${LIBRT})
DTRACE_INSTRUMENT(mysys)
IF (WIN32)
TARGET_LINK_LIBRARIES(mysys IPHLPAPI)
ENDIF(WIN32)
ADD_EXECUTABLE(thr_lock thr_lock.c)
TARGET_LINK_LIBRARIES(thr_lock mysys)
SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
......
......@@ -1239,10 +1239,9 @@ static my_bool allocate_head(MARIA_FILE_BITMAP *bitmap, uint size,
uint min_bits= size_to_head_pattern(bitmap, size);
uchar *data= bitmap->map, *end= data + bitmap->used_size;
uchar *best_data= 0;
uint best_bits= (uint) -1, best_pos;
uint best_bits= (uint) -1, UNINIT_VAR(best_pos);
DBUG_ENTER("allocate_head");
LINT_INIT(best_pos);
DBUG_ASSERT(size <= FULL_PAGE_SIZE(bitmap->block_size));
for (; data < end; data+= 6)
......@@ -1319,11 +1318,10 @@ static my_bool allocate_tail(MARIA_FILE_BITMAP *bitmap, uint size,
uint min_bits= size_to_tail_pattern(bitmap, size);
uchar *data= bitmap->map, *end= data + bitmap->used_size;
uchar *best_data= 0;
uint best_bits= (uint) -1, best_pos;
uint best_bits= (uint) -1, UNINIT_VAR(best_pos);
DBUG_ENTER("allocate_tail");
DBUG_PRINT("enter", ("size: %u", size));
LINT_INIT(best_pos);
/*
We have to add DIR_ENTRY_SIZE here as this is not part of the data size
See call to allocate_tail() in find_tail().
......
......@@ -798,8 +798,7 @@ get_one_option(int optid,
case OPT_STATS_METHOD:
{
int method;
enum_handler_stats_method method_conv;
LINT_INIT(method_conv);
enum_handler_stats_method UNINIT_VAR(method_conv);
maria_stats_method_str= argument;
if ((method=find_type(argument, &maria_stats_method_typelib, 2)) <= 0)
{
......
......@@ -670,8 +670,8 @@ get_one_option(int optid,
case OPT_STATS_METHOD:
{
int method;
enum_handler_stats_method method_conv;
LINT_INIT(method_conv);
enum_handler_stats_method UNINIT_VAR(method_conv);
myisam_stats_method_str= argument;
if ((method= find_type(argument, &myisam_stats_method_typelib,
FIND_TYPE_BASIC)) <= 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