Commit 4da2b83a authored by Monty's avatar Monty

Fixed compiler error and some warnings on windows

parent a5051cd3
...@@ -250,7 +250,7 @@ static my_bool print_win_error_msg(DWORD error, my_bool verbose) ...@@ -250,7 +250,7 @@ static my_bool print_win_error_msg(DWORD error, my_bool verbose)
will ignore calls to register already registered error numbers. will ignore calls to register already registered error numbers.
*/ */
static const char **get_handler_error_messages() static const char **get_handler_error_messages(void)
{ {
return handler_error_messages; return handler_error_messages;
} }
......
...@@ -217,7 +217,7 @@ void my_message(uint error, const char *str, register myf MyFlags) ...@@ -217,7 +217,7 @@ void my_message(uint error, const char *str, register myf MyFlags)
@retval != 0 Error @retval != 0 Error
*/ */
int my_error_register(const char** (*get_errmsgs) (), uint first, uint last) int my_error_register(const char** (*get_errmsgs) (void), uint first, uint last)
{ {
struct my_err_head *meh_p; struct my_err_head *meh_p;
struct my_err_head **search_meh_pp; struct my_err_head **search_meh_pp;
......
...@@ -224,7 +224,7 @@ my_bool check_datetime_range(const MYSQL_TIME *ltime) ...@@ -224,7 +224,7 @@ my_bool check_datetime_range(const MYSQL_TIME *ltime)
ltime->minute > 59 || ltime->second > 59 || ltime->minute > 59 || ltime->second > 59 ||
ltime->second_part > TIME_MAX_SECOND_PART || ltime->second_part > TIME_MAX_SECOND_PART ||
(ltime->hour > (ltime->hour >
(ltime->time_type == MYSQL_TIMESTAMP_TIME ? TIME_MAX_HOUR : 23)); (uint) (ltime->time_type == MYSQL_TIMESTAMP_TIME ? TIME_MAX_HOUR : 23));
} }
...@@ -237,7 +237,7 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status, ...@@ -237,7 +237,7 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status,
if (get_digits(&tmp, number_of_fields, str, end, 6)) if (get_digits(&tmp, number_of_fields, str, end, 6))
status->warnings|= MYSQL_TIME_WARN_TRUNCATED; status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
if ((status->precision= (*str - start)) < 6) if ((status->precision= (*str - start)) < 6)
*val= tmp * log_10_int[6 - (*str - start)]; *val= (ulong) (tmp * log_10_int[6 - (*str - start)]);
else else
*val= tmp; *val= tmp;
if (skip_digits(str, end)) if (skip_digits(str, end))
......
...@@ -35,7 +35,7 @@ static void init_myfunc_errs(void); ...@@ -35,7 +35,7 @@ static void init_myfunc_errs(void);
C_MODE_START C_MODE_START
static const char **get_server_errmsgs() static const char **get_server_errmsgs(void)
{ {
if (!current_thd) if (!current_thd)
return DEFAULT_ERRMSGS; return DEFAULT_ERRMSGS;
......
...@@ -284,7 +284,7 @@ handler *get_ha_partition(partition_info *part_info) ...@@ -284,7 +284,7 @@ handler *get_ha_partition(partition_info *part_info)
static const char **handler_errmsgs; static const char **handler_errmsgs;
C_MODE_START C_MODE_START
static const char **get_handler_errmsgs() static const char **get_handler_errmsgs(void)
{ {
return handler_errmsgs; return handler_errmsgs;
} }
......
...@@ -831,7 +831,7 @@ my_real_read(NET *net, size_t *complen, ...@@ -831,7 +831,7 @@ my_real_read(NET *net, size_t *complen,
size_t length; size_t length;
uint i,retry_count=0; uint i,retry_count=0;
ulong len=packet_error; ulong len=packet_error;
my_bool expect_error_packet __attribute((unused))= 0; my_bool expect_error_packet __attribute__((unused))= 0;
thr_alarm_t alarmed; thr_alarm_t alarmed;
#ifndef NO_ALARM #ifndef NO_ALARM
ALARM alarm_buff; ALARM alarm_buff;
......
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