diff options
author | Monty <monty@mariadb.org> | 2016-08-23 15:03:31 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-08-23 15:03:31 +0300 |
commit | 4da2b83af712492e4c3cb85e0005cde8511fa810 (patch) | |
tree | 8bd98ff55c522d7a99b1ae94a8f84d18567c4ab4 | |
parent | a5051cd3b2a46eb01ef9afdb1d798bdf6db715ab (diff) | |
download | mariadb-git-4da2b83af712492e4c3cb85e0005cde8511fa810.tar.gz |
Fixed compiler error and some warnings on windows
-rw-r--r-- | extra/perror.c | 2 | ||||
-rw-r--r-- | mysys/my_error.c | 2 | ||||
-rw-r--r-- | sql-common/my_time.c | 4 | ||||
-rw-r--r-- | sql/derror.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 2 | ||||
-rw-r--r-- | sql/net_serv.cc | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/extra/perror.c b/extra/perror.c index 8aa6aa35b08..55d1e921739 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -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. */ -static const char **get_handler_error_messages() +static const char **get_handler_error_messages(void) { return handler_error_messages; } diff --git a/mysys/my_error.c b/mysys/my_error.c index 5d16091e0be..44d112bc049 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -217,7 +217,7 @@ void my_message(uint error, const char *str, register myf MyFlags) @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 **search_meh_pp; diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 28757a2c96c..7cf8692a3f6 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -224,7 +224,7 @@ my_bool check_datetime_range(const MYSQL_TIME *ltime) ltime->minute > 59 || ltime->second > 59 || ltime->second_part > TIME_MAX_SECOND_PART || (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, if (get_digits(&tmp, number_of_fields, str, end, 6)) status->warnings|= MYSQL_TIME_WARN_TRUNCATED; if ((status->precision= (*str - start)) < 6) - *val= tmp * log_10_int[6 - (*str - start)]; + *val= (ulong) (tmp * log_10_int[6 - (*str - start)]); else *val= tmp; if (skip_digits(str, end)) diff --git a/sql/derror.cc b/sql/derror.cc index f19f73238fb..776b2bb98e1 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -35,7 +35,7 @@ static void init_myfunc_errs(void); C_MODE_START -static const char **get_server_errmsgs() +static const char **get_server_errmsgs(void) { if (!current_thd) return DEFAULT_ERRMSGS; diff --git a/sql/handler.cc b/sql/handler.cc index 0edff665a33..8298d286259 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -284,7 +284,7 @@ handler *get_ha_partition(partition_info *part_info) static const char **handler_errmsgs; C_MODE_START -static const char **get_handler_errmsgs() +static const char **get_handler_errmsgs(void) { return handler_errmsgs; } diff --git a/sql/net_serv.cc b/sql/net_serv.cc index b48d36700c6..3e17ced92ba 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -831,7 +831,7 @@ my_real_read(NET *net, size_t *complen, size_t length; uint i,retry_count=0; ulong len=packet_error; - my_bool expect_error_packet __attribute((unused))= 0; + my_bool expect_error_packet __attribute__((unused))= 0; thr_alarm_t alarmed; #ifndef NO_ALARM ALARM alarm_buff; |