Commit fa01b76b authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-4243 : remove several clang warnings.

parent e91e8c8c
...@@ -6,121 +6,124 @@ ...@@ -6,121 +6,124 @@
#define _PROBES_MYSQL_D #define _PROBES_MYSQL_D
#ifdef __cplusplus #ifdef __cplusplus
#define MYSQL_PROBES_FALSE false
extern "C" { extern "C" {
#else
#define MYSQL_PROBES_FALSE 0
#endif #endif
#define MYSQL_CONNECTION_START(arg0, arg1, arg2) #define MYSQL_CONNECTION_START(arg0, arg1, arg2)
#define MYSQL_CONNECTION_START_ENABLED() (0) #define MYSQL_CONNECTION_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_CONNECTION_DONE(arg0, arg1) #define MYSQL_CONNECTION_DONE(arg0, arg1)
#define MYSQL_CONNECTION_DONE_ENABLED() (0) #define MYSQL_CONNECTION_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3) #define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
#define MYSQL_COMMAND_START_ENABLED() (0) #define MYSQL_COMMAND_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_COMMAND_DONE(arg0) #define MYSQL_COMMAND_DONE(arg0)
#define MYSQL_COMMAND_DONE_ENABLED() (0) #define MYSQL_COMMAND_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4) #define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
#define MYSQL_QUERY_START_ENABLED() (0) #define MYSQL_QUERY_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_DONE(arg0) #define MYSQL_QUERY_DONE(arg0)
#define MYSQL_QUERY_DONE_ENABLED() (0) #define MYSQL_QUERY_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_PARSE_START(arg0) #define MYSQL_QUERY_PARSE_START(arg0)
#define MYSQL_QUERY_PARSE_START_ENABLED() (0) #define MYSQL_QUERY_PARSE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_PARSE_DONE(arg0) #define MYSQL_QUERY_PARSE_DONE(arg0)
#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0) #define MYSQL_QUERY_PARSE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_CACHE_HIT(arg0, arg1) #define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0) #define MYSQL_QUERY_CACHE_HIT_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_CACHE_MISS(arg0) #define MYSQL_QUERY_CACHE_MISS(arg0)
#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0) #define MYSQL_QUERY_CACHE_MISS_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5) #define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
#define MYSQL_QUERY_EXEC_START_ENABLED() (0) #define MYSQL_QUERY_EXEC_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_QUERY_EXEC_DONE(arg0) #define MYSQL_QUERY_EXEC_DONE(arg0)
#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0) #define MYSQL_QUERY_EXEC_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_ROW_START(arg0, arg1) #define MYSQL_INSERT_ROW_START(arg0, arg1)
#define MYSQL_INSERT_ROW_START_ENABLED() (0) #define MYSQL_INSERT_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_ROW_DONE(arg0) #define MYSQL_INSERT_ROW_DONE(arg0)
#define MYSQL_INSERT_ROW_DONE_ENABLED() (0) #define MYSQL_INSERT_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_UPDATE_ROW_START(arg0, arg1) #define MYSQL_UPDATE_ROW_START(arg0, arg1)
#define MYSQL_UPDATE_ROW_START_ENABLED() (0) #define MYSQL_UPDATE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_UPDATE_ROW_DONE(arg0) #define MYSQL_UPDATE_ROW_DONE(arg0)
#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0) #define MYSQL_UPDATE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_DELETE_ROW_START(arg0, arg1) #define MYSQL_DELETE_ROW_START(arg0, arg1)
#define MYSQL_DELETE_ROW_START_ENABLED() (0) #define MYSQL_DELETE_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_DELETE_ROW_DONE(arg0) #define MYSQL_DELETE_ROW_DONE(arg0)
#define MYSQL_DELETE_ROW_DONE_ENABLED() (0) #define MYSQL_DELETE_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_READ_ROW_START(arg0, arg1, arg2) #define MYSQL_READ_ROW_START(arg0, arg1, arg2)
#define MYSQL_READ_ROW_START_ENABLED() (0) #define MYSQL_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_READ_ROW_DONE(arg0) #define MYSQL_READ_ROW_DONE(arg0)
#define MYSQL_READ_ROW_DONE_ENABLED() (0) #define MYSQL_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1) #define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
#define MYSQL_INDEX_READ_ROW_START_ENABLED() (0) #define MYSQL_INDEX_READ_ROW_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INDEX_READ_ROW_DONE(arg0) #define MYSQL_INDEX_READ_ROW_DONE(arg0)
#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0) #define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1) #define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0) #define MYSQL_HANDLER_RDLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1) #define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0) #define MYSQL_HANDLER_WRLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1) #define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0) #define MYSQL_HANDLER_UNLOCK_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_RDLOCK_DONE(arg0) #define MYSQL_HANDLER_RDLOCK_DONE(arg0)
#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0) #define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_WRLOCK_DONE(arg0) #define MYSQL_HANDLER_WRLOCK_DONE(arg0)
#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0) #define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_HANDLER_UNLOCK_DONE(arg0) #define MYSQL_HANDLER_UNLOCK_DONE(arg0)
#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0) #define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_FILESORT_START(arg0, arg1) #define MYSQL_FILESORT_START(arg0, arg1)
#define MYSQL_FILESORT_START_ENABLED() (0) #define MYSQL_FILESORT_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_FILESORT_DONE(arg0, arg1) #define MYSQL_FILESORT_DONE(arg0, arg1)
#define MYSQL_FILESORT_DONE_ENABLED() (0) #define MYSQL_FILESORT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_SELECT_START(arg0) #define MYSQL_SELECT_START(arg0)
#define MYSQL_SELECT_START_ENABLED() (0) #define MYSQL_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_SELECT_DONE(arg0, arg1) #define MYSQL_SELECT_DONE(arg0, arg1)
#define MYSQL_SELECT_DONE_ENABLED() (0) #define MYSQL_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_START(arg0) #define MYSQL_INSERT_START(arg0)
#define MYSQL_INSERT_START_ENABLED() (0) #define MYSQL_INSERT_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_DONE(arg0, arg1) #define MYSQL_INSERT_DONE(arg0, arg1)
#define MYSQL_INSERT_DONE_ENABLED() (0) #define MYSQL_INSERT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_SELECT_START(arg0) #define MYSQL_INSERT_SELECT_START(arg0)
#define MYSQL_INSERT_SELECT_START_ENABLED() (0) #define MYSQL_INSERT_SELECT_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_INSERT_SELECT_DONE(arg0, arg1) #define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0) #define MYSQL_INSERT_SELECT_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_UPDATE_START(arg0) #define MYSQL_UPDATE_START(arg0)
#define MYSQL_UPDATE_START_ENABLED() (0) #define MYSQL_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_UPDATE_DONE(arg0, arg1, arg2) #define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
#define MYSQL_UPDATE_DONE_ENABLED() (0) #define MYSQL_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_MULTI_UPDATE_START(arg0) #define MYSQL_MULTI_UPDATE_START(arg0)
#define MYSQL_MULTI_UPDATE_START_ENABLED() (0) #define MYSQL_MULTI_UPDATE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2) #define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0) #define MYSQL_MULTI_UPDATE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_DELETE_START(arg0) #define MYSQL_DELETE_START(arg0)
#define MYSQL_DELETE_START_ENABLED() (0) #define MYSQL_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_DELETE_DONE(arg0, arg1) #define MYSQL_DELETE_DONE(arg0, arg1)
#define MYSQL_DELETE_DONE_ENABLED() (0) #define MYSQL_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_MULTI_DELETE_START(arg0) #define MYSQL_MULTI_DELETE_START(arg0)
#define MYSQL_MULTI_DELETE_START_ENABLED() (0) #define MYSQL_MULTI_DELETE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_MULTI_DELETE_DONE(arg0, arg1) #define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0) #define MYSQL_MULTI_DELETE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_NET_READ_START() #define MYSQL_NET_READ_START()
#define MYSQL_NET_READ_START_ENABLED() (0) #define MYSQL_NET_READ_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_NET_READ_DONE(arg0, arg1) #define MYSQL_NET_READ_DONE(arg0, arg1)
#define MYSQL_NET_READ_DONE_ENABLED() (0) #define MYSQL_NET_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_NET_WRITE_START(arg0) #define MYSQL_NET_WRITE_START(arg0)
#define MYSQL_NET_WRITE_START_ENABLED() (0) #define MYSQL_NET_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_NET_WRITE_DONE(arg0) #define MYSQL_NET_WRITE_DONE(arg0)
#define MYSQL_NET_WRITE_DONE_ENABLED() (0) #define MYSQL_NET_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3) #define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
#define MYSQL_KEYCACHE_READ_START_ENABLED() (0) #define MYSQL_KEYCACHE_READ_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_READ_BLOCK(arg0) #define MYSQL_KEYCACHE_READ_BLOCK(arg0)
#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0) #define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_READ_HIT() #define MYSQL_KEYCACHE_READ_HIT()
#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0) #define MYSQL_KEYCACHE_READ_HIT_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_READ_MISS() #define MYSQL_KEYCACHE_READ_MISS()
#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0) #define MYSQL_KEYCACHE_READ_MISS_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1) #define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0) #define MYSQL_KEYCACHE_READ_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3) #define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0) #define MYSQL_KEYCACHE_WRITE_START_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0) #define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0) #define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (MYSQL_PROBES_FALSE)
#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1) #define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0) #define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (MYSQL_PROBES_FALSE)
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -8097,7 +8097,7 @@ bool Item_default_value::fix_fields(THD *thd, Item **items) ...@@ -8097,7 +8097,7 @@ bool Item_default_value::fix_fields(THD *thd, Item **items)
} }
if (!(def_field= (Field*) sql_alloc(field_arg->field->size_of()))) if (!(def_field= (Field*) sql_alloc(field_arg->field->size_of())))
goto error; goto error;
memcpy(def_field, field_arg->field, field_arg->field->size_of()); memcpy((void *)def_field, (void *)field_arg->field, field_arg->field->size_of());
def_field->move_field_offset((my_ptrdiff_t) def_field->move_field_offset((my_ptrdiff_t)
(def_field->table->s->default_values - (def_field->table->s->default_values -
def_field->table->record[0])); def_field->table->record[0]));
...@@ -8233,7 +8233,7 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items) ...@@ -8233,7 +8233,7 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
Field *def_field= (Field*) sql_alloc(field_arg->field->size_of()); Field *def_field= (Field*) sql_alloc(field_arg->field->size_of());
if (!def_field) if (!def_field)
return TRUE; return TRUE;
memcpy(def_field, field_arg->field, field_arg->field->size_of()); memcpy((void *)def_field, (void *)field_arg->field, field_arg->field->size_of());
def_field->move_field_offset((my_ptrdiff_t) def_field->move_field_offset((my_ptrdiff_t)
(def_field->table->insert_values - (def_field->table->insert_values -
def_field->table->record[0])); def_field->table->record[0]));
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
#define FIELD_NR_MASK 16383 /* To get fieldnumber */ #define FIELD_NR_MASK 16383 /* To get fieldnumber */
#define FERR -1 /* Error from my_functions */ #define FERR -1 /* Error from my_functions */
#define CREATE_MODE 0 /* Default mode on new files */ #define CREATE_MODE 0 /* Default mode on new files */
#define NAMES_SEP_CHAR '\377' /* Char to sep. names */ #define NAMES_SEP_CHAR 255 /* Char to sep. names */
#define READ_RECORD_BUFFER (uint) (IO_SIZE*8) /* Pointer_buffer_size */ #define READ_RECORD_BUFFER (uint) (IO_SIZE*8) /* Pointer_buffer_size */
#define DISK_BUFFER_SIZE (uint) (IO_SIZE*16) /* Size of diskbuffer */ #define DISK_BUFFER_SIZE (uint) (IO_SIZE*16) /* Size of diskbuffer */
......
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