diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-08-11 13:26:54 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-08-24 01:05:48 +0200 |
commit | a6e215f221b1ed71eba2f313fb0102647d84f854 (patch) | |
tree | 2eab1e74c75821e27de72d299f1e35a4744bdf5a /include/mysql | |
parent | d5a6bae7c0bbef9963b73b064bec3ae1e47ec45c (diff) | |
download | mariadb-git-a6e215f221b1ed71eba2f313fb0102647d84f854.tar.gz |
Fix compilation warnings in plugins
* update cracklib_password_check to match the new prototype
* cannot use __attribute__((format)) for my_snprintf, because
we support format extensions that the compiler doesn't know about.
Diffstat (limited to 'include/mysql')
-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 |
6 files changed, 21 insertions, 39 deletions
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 |