diff options
-rw-r--r-- | client/mysqlcheck.c | 2 | ||||
-rw-r--r-- | include/mysql/plugin_audit.h.pp | 9 | ||||
-rw-r--r-- | include/mysql/plugin_auth.h.pp | 9 | ||||
-rw-r--r-- | include/mysql/plugin_encryption.h.pp | 9 | ||||
-rw-r--r-- | include/mysql/plugin_ftparser.h.pp | 9 | ||||
-rw-r--r-- | include/mysql/plugin_password_validation.h.pp | 9 | ||||
-rw-r--r-- | include/mysql/service_my_snprintf.h | 15 | ||||
-rw-r--r-- | plugin/cracklib_password_check/cracklib_password_check.c | 2 | ||||
-rw-r--r-- | sql/field.cc | 2 |
9 files changed, 23 insertions, 43 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index c633be6b734..d5938776452 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -19,8 +19,6 @@ /* By Jani Tolonen, 2001-04-20, MySQL Development Team */ #define CHECK_VERSION "2.7.4-MariaDB" -/* Avoid warnings from %'s format */ -#define USING_MARIADB_SNPRINTF_EXTENSIONS #include "client_priv.h" #include <m_ctype.h> diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp index 43e64c06bf1..1d82197c321 100644 --- a/include/mysql/plugin_audit.h.pp +++ b/include/mysql/plugin_audit.h.pp @@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num); unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length); unsigned int my_aes_ctx_size(enum my_aes_mode mode); extern struct my_print_error_service_st { - void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); - void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); - void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); + void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); + void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); + void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); } *my_print_error_service; extern void my_error(unsigned int nr, unsigned long MyFlags, ...); extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...); @@ -178,8 +178,7 @@ extern struct my_snprintf_service_st { size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); } *my_snprintf_service; -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ; +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); extern struct progress_report_service_st { void (*thd_progress_init_func)(void* thd, unsigned int max_stage); diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp index 3ee1f70ca80..0c196b1ad0b 100644 --- a/include/mysql/plugin_auth.h.pp +++ b/include/mysql/plugin_auth.h.pp @@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num); unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length); unsigned int my_aes_ctx_size(enum my_aes_mode mode); extern struct my_print_error_service_st { - void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); - void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); - void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); + void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); + void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); + void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); } *my_print_error_service; extern void my_error(unsigned int nr, unsigned long MyFlags, ...); extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...); @@ -178,8 +178,7 @@ extern struct my_snprintf_service_st { size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); } *my_snprintf_service; -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ; +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); extern struct progress_report_service_st { void (*thd_progress_init_func)(void* thd, unsigned int max_stage); diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp index 4791846f4f2..699296994c2 100644 --- a/include/mysql/plugin_encryption.h.pp +++ b/include/mysql/plugin_encryption.h.pp @@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num); unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length); unsigned int my_aes_ctx_size(enum my_aes_mode mode); extern struct my_print_error_service_st { - void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); - void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); - void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); + void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); + void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); + void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); } *my_print_error_service; extern void my_error(unsigned int nr, unsigned long MyFlags, ...); extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...); @@ -178,8 +178,7 @@ extern struct my_snprintf_service_st { size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); } *my_snprintf_service; -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ; +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); extern struct progress_report_service_st { void (*thd_progress_init_func)(void* thd, unsigned int max_stage); diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp index 8fde9918fbc..e67211e5108 100644 --- a/include/mysql/plugin_ftparser.h.pp +++ b/include/mysql/plugin_ftparser.h.pp @@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num); unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length); unsigned int my_aes_ctx_size(enum my_aes_mode mode); extern struct my_print_error_service_st { - void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); - void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); - void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); + void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); + void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); + void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); } *my_print_error_service; extern void my_error(unsigned int nr, unsigned long MyFlags, ...); extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...); @@ -178,8 +178,7 @@ extern struct my_snprintf_service_st { size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); } *my_snprintf_service; -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ; +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); extern struct progress_report_service_st { void (*thd_progress_init_func)(void* thd, unsigned int max_stage); diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp index 9d7717f4b32..d19a4fd74b2 100644 --- a/include/mysql/plugin_password_validation.h.pp +++ b/include/mysql/plugin_password_validation.h.pp @@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num); unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length); unsigned int my_aes_ctx_size(enum my_aes_mode mode); extern struct my_print_error_service_st { - void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); - void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); - void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); + void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...); + void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...); + void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap); } *my_print_error_service; extern void my_error(unsigned int nr, unsigned long MyFlags, ...); extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...); @@ -178,8 +178,7 @@ extern struct my_snprintf_service_st { size_t (*my_snprintf_type)(char*, size_t, const char*, ...); size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list); } *my_snprintf_service; -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ; +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); extern struct progress_report_service_st { void (*thd_progress_init_func)(void* thd, unsigned int max_stage); diff --git a/include/mysql/service_my_snprintf.h b/include/mysql/service_my_snprintf.h index 1b2ee2ca202..4a99561dd00 100644 --- a/include/mysql/service_my_snprintf.h +++ b/include/mysql/service_my_snprintf.h @@ -92,22 +92,9 @@ extern struct my_snprintf_service_st { #else -#ifndef ATTRIBUTE_FORMAT -#define ATTRIBUTE_FORMAT_DEFINED -#define ATTRIBUTE_FORMAT(A,B,C) -#endif -#if defined(MYSQL_ABI_CHECK) || defined(USING_MARIADB_SNPRINTF_EXTENSIONS) -#undef ATTRIBUTE_FORMAT -#define ATTRIBUTE_FORMAT(A,B,C) -#endif -size_t my_snprintf(char* to, size_t n, const char* fmt, ...) - ATTRIBUTE_FORMAT(printf, 3, 4); +size_t my_snprintf(char* to, size_t n, const char* fmt, ...); size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap); -#ifdef ATTRIBUTE_FORMAT_DEFINED -#undef ATTRIBUTE_FORMAT_DEFINED -#undef ATTRIBUTE_FORMAT -#endif #endif #ifdef __cplusplus diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c index d4c3aba5b77..1fea9899ca1 100644 --- a/plugin/cracklib_password_check/cracklib_password_check.c +++ b/plugin/cracklib_password_check/cracklib_password_check.c @@ -23,7 +23,7 @@ static char *dictionary; -static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password) +static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password) { char *user= alloca(username->length + 1); char *host; diff --git a/sql/field.cc b/sql/field.cc index 45c0e20f757..8ca3c909041 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -51,7 +51,7 @@ *****************************************************************************/ static const char *zero_timestamp="0000-00-00 00:00:00.000000"; -LEX_CSTRING temp_lex_str= {"temp", 4}; +LEX_CSTRING temp_lex_str= {STRING_WITH_LEN("temp")}; uchar Field_null::null[1]={1}; const char field_separator=','; |