mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-13384 Fix Windows warnings. thd_alloc functions now use size_t parameters
Fixes some warnings in popular headers.
This commit is contained in:
@@ -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, ...);
|
||||
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
void *(*thd_alloc_func)(void*, size_t);
|
||||
void *(*thd_calloc_func)(void*, size_t);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(void*, const char *, size_t);
|
||||
void *(*thd_memdup_func)(void*, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
void *thd_alloc(void* thd, size_t size);
|
||||
void *thd_calloc(void* thd, size_t size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
char *thd_strmake(void* thd, const char *str, size_t size);
|
||||
void *thd_memdup(void* thd, const void* str, size_t size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
extern struct thd_autoinc_service_st {
|
||||
void (*thd_get_autoinc_func)(const void* thd,
|
||||
|
@@ -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, ...);
|
||||
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
void *(*thd_alloc_func)(void*, size_t);
|
||||
void *(*thd_calloc_func)(void*, size_t);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(void*, const char *, size_t);
|
||||
void *(*thd_memdup_func)(void*, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
void *thd_alloc(void* thd, size_t size);
|
||||
void *thd_calloc(void* thd, size_t size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
char *thd_strmake(void* thd, const char *str, size_t size);
|
||||
void *thd_memdup(void* thd, const void* str, size_t size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
extern struct thd_autoinc_service_st {
|
||||
void (*thd_get_autoinc_func)(const void* thd,
|
||||
|
@@ -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, ...);
|
||||
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
void *(*thd_alloc_func)(void*, size_t);
|
||||
void *(*thd_calloc_func)(void*, size_t);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(void*, const char *, size_t);
|
||||
void *(*thd_memdup_func)(void*, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
void *thd_alloc(void* thd, size_t size);
|
||||
void *thd_calloc(void* thd, size_t size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
char *thd_strmake(void* thd, const char *str, size_t size);
|
||||
void *thd_memdup(void* thd, const void* str, size_t size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
extern struct thd_autoinc_service_st {
|
||||
void (*thd_get_autoinc_func)(const void* thd,
|
||||
|
@@ -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, ...);
|
||||
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
void *(*thd_alloc_func)(void*, size_t);
|
||||
void *(*thd_calloc_func)(void*, size_t);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(void*, const char *, size_t);
|
||||
void *(*thd_memdup_func)(void*, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
void *thd_alloc(void* thd, size_t size);
|
||||
void *thd_calloc(void* thd, size_t size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
char *thd_strmake(void* thd, const char *str, size_t size);
|
||||
void *thd_memdup(void* thd, const void* str, size_t size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
extern struct thd_autoinc_service_st {
|
||||
void (*thd_get_autoinc_func)(const void* thd,
|
||||
|
@@ -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, ...);
|
||||
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
void *(*thd_alloc_func)(void*, size_t);
|
||||
void *(*thd_calloc_func)(void*, size_t);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(void*, const char *, size_t);
|
||||
void *(*thd_memdup_func)(void*, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
void *thd_alloc(void* thd, size_t size);
|
||||
void *thd_calloc(void* thd, size_t size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
char *thd_strmake(void* thd, const char *str, size_t size);
|
||||
void *thd_memdup(void* thd, const void* str, size_t size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
extern struct thd_autoinc_service_st {
|
||||
void (*thd_get_autoinc_func)(const void* thd,
|
||||
|
@@ -43,13 +43,13 @@ struct st_mysql_lex_string
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(MYSQL_THD, unsigned int);
|
||||
void *(*thd_calloc_func)(MYSQL_THD, unsigned int);
|
||||
void *(*thd_alloc_func)(MYSQL_THD, size_t);
|
||||
void *(*thd_calloc_func)(MYSQL_THD, size_t);
|
||||
char *(*thd_strdup_func)(MYSQL_THD, const char *);
|
||||
char *(*thd_strmake_func)(MYSQL_THD, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(MYSQL_THD, const void*, unsigned int);
|
||||
char *(*thd_strmake_func)(MYSQL_THD, const char *, size_t);
|
||||
void *(*thd_memdup_func)(MYSQL_THD, const void*, size_t);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
const char *, size_t, int);
|
||||
} *thd_alloc_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
@@ -84,11 +84,11 @@ extern struct thd_alloc_service_st {
|
||||
|
||||
@see alloc_root()
|
||||
*/
|
||||
void *thd_alloc(MYSQL_THD thd, unsigned int size);
|
||||
void *thd_alloc(MYSQL_THD thd, size_t size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_calloc(MYSQL_THD thd, unsigned int size);
|
||||
void *thd_calloc(MYSQL_THD thd, size_t size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
@@ -96,11 +96,11 @@ char *thd_strdup(MYSQL_THD thd, const char *str);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
|
||||
char *thd_strmake(MYSQL_THD thd, const char *str, size_t size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
|
||||
void *thd_memdup(MYSQL_THD thd, const void* str, size_t size);
|
||||
|
||||
/**
|
||||
Create a LEX_STRING in this connection's local memory pool
|
||||
@@ -116,7 +116,7 @@ void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
|
||||
@see thd_alloc()
|
||||
*/
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
const char *str, size_t size,
|
||||
int allocate_lex_string);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user