diff options
author | Eugene Kosov <claprix@yandex.ru> | 2019-06-24 19:38:00 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2019-06-25 13:21:36 +0300 |
commit | d36c107a6b7f9e9bc9425072f2ac13afd2334069 (patch) | |
tree | f2789ec42ae3419e7633aeb08b5a8a27fd703329 | |
parent | d78145459f79d02438e0d57fe8acaff757018c97 (diff) | |
download | mariadb-git-d36c107a6b7f9e9bc9425072f2ac13afd2334069.tar.gz |
imporve clang build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug
Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about
deprecated `register` keyword.
Too much warnings came from Mroonga and I gave up on it.
55 files changed, 152 insertions, 158 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index f938c8f00ff..31c1d443607 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3128,7 +3128,7 @@ static int com_help(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { - reg1 int i, j; + int i, j; char * help_arg= strchr(line,' '), buff[32], *end; if (help_arg) { diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 051e7fbef02..1f17f75e1b8 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1044,8 +1044,8 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query, const char *query_end, my_bool pass_through_escape_chars) { const char *p; - register char c, next_c; - register int escaped = 0; + char c, next_c; + int escaped = 0; VAR *v; DBUG_ENTER("do_eval"); @@ -2341,7 +2341,7 @@ C_MODE_START static uchar *get_var_key(const uchar* var, size_t *len, my_bool __attribute__((unused)) t) { - register char* key; + char* key; key = ((VAR*)var)->name; *len = ((VAR*)var)->name_len; return (uchar*)key; @@ -9900,7 +9900,7 @@ typedef struct st_pointer_array { /* when using array-strings */ struct st_replace *init_replace(char * *from, char * *to, uint count, char * word_end_chars); -int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name); +int insert_pointer_name(POINTER_ARRAY *pa,char * name); void free_pointer_array(POINTER_ARRAY *pa); /* @@ -9984,8 +9984,8 @@ void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds, const char *str, int len __attribute__((unused))) { - reg1 REPLACE *rep_pos; - reg2 REPLACE_STRING *rep_str; + REPLACE *rep_pos; + REPLACE_STRING *rep_str; const char *start, *from; DBUG_ENTER("replace_strings_append"); @@ -10891,7 +10891,7 @@ void internal_clear_bit(REP_SET *set, uint bit) void or_bits(REP_SET *to,REP_SET *from) { - reg1 uint i; + uint i; for (i=0 ; i < to->size_of_bits ; i++) to->bits[i]|=from->bits[i]; return; @@ -10993,7 +10993,7 @@ uint end_of_word(char * pos) #define PC_MALLOC 256 /* Bytes for pointers */ #define PS_MALLOC 512 /* Bytes for data */ -int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name) +int insert_pointer_name(POINTER_ARRAY *pa,char * name) { uint i,length,old_count; uchar *new_pos; diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc index f15f0c40556..543fd4102f2 100644 --- a/extra/mariabackup/backup_mysql.cc +++ b/extra/mariabackup/backup_mysql.cc @@ -1393,8 +1393,6 @@ write_xtrabackup_info(MYSQL *connection) const char *xb_stream_name[] = {"file", "tar", "xbstream"}; - ut_ad(xtrabackup_stream_fmt < 3); - uuid = read_mysql_one_value(connection, "SELECT UUID()"); server_version = read_mysql_one_value(connection, "SELECT VERSION()"); localtime_r(&history_start_time, &tm); diff --git a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h index d60d5a0e398..f229f8b612c 100644 --- a/extra/yassl/include/openssl/crypto.h +++ b/extra/yassl/include/openssl/crypto.h @@ -19,7 +19,7 @@ /* crypto.h for openSSL */ -#ifndef ysSSL_crypto_h__ +#ifndef yaSSL_crypto_h__ #define yaSSL_crypto_h__ #ifdef YASSL_PREFIX diff --git a/extra/yassl/taocrypt/src/des.cpp b/extra/yassl/taocrypt/src/des.cpp index 5b6fd9aa05b..f921cfcc977 100644 --- a/extra/yassl/taocrypt/src/des.cpp +++ b/extra/yassl/taocrypt/src/des.cpp @@ -224,7 +224,7 @@ void BasicDES::SetKey(const byte* key, word32 /*length*/, CipherDir dir) byte *const pc1m = buffer; /* place to modify pc1 into */ byte *const pcr = pc1m + 56; /* place to rotate pc1 into */ byte *const ks = pcr + 56; - register int i,j,l; + int i,j,l; int m; for (j = 0; j < 56; j++) { /* convert pc1 to bits of key */ diff --git a/include/heap.h b/include/heap.h index dd822f4c243..d0c907a48b4 100644 --- a/include/heap.h +++ b/include/heap.h @@ -217,7 +217,7 @@ extern int heap_write(HP_INFO *info,const uchar *buff); extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata); extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos); extern int heap_scan_init(HP_INFO *info); -extern int heap_scan(register HP_INFO *info, uchar *record); +extern int heap_scan(HP_INFO *info, uchar *record); extern int heap_delete(HP_INFO *info,const uchar *buff); extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag); extern int heap_create(const char *name, diff --git a/include/maria.h b/include/maria.h index 4cf8c1730ac..cbc03687f1d 100644 --- a/include/maria.h +++ b/include/maria.h @@ -366,7 +366,7 @@ int maria_sort_index(HA_CHECK *param, MARIA_HA *info, char * name); int maria_zerofill(HA_CHECK *param, MARIA_HA *info, const char *name); int maria_repair_by_sort(HA_CHECK *param, MARIA_HA *info, const char *name, my_bool rep_quick); -int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info, +int maria_repair_parallel(HA_CHECK *param, MARIA_HA *info, const char *name, my_bool rep_quick); int maria_change_to_newfile(const char *filename, const char *old_ext, const char *new_ext, time_t backup_time, diff --git a/include/myisam.h b/include/myisam.h index 3495cf16424..2a3444f78f6 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -373,7 +373,7 @@ typedef struct st_mi_sort_param int (*key_read)(struct st_mi_sort_param *,void *); int (*key_write)(struct st_mi_sort_param *, const void *); void (*lock_in_memory)(HA_CHECK *); - int (*write_keys)(struct st_mi_sort_param *, register uchar **, + int (*write_keys)(struct st_mi_sort_param *, uchar **, ulonglong , struct st_buffpek *, IO_CACHE *); my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint); int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *, @@ -383,16 +383,16 @@ typedef struct st_mi_sort_param /* functions in mi_check */ void myisamchk_init(HA_CHECK *param); int chk_status(HA_CHECK *param, MI_INFO *info); -int chk_del(HA_CHECK *param, register MI_INFO *info, ulonglong test_flag); +int chk_del(HA_CHECK *param, MI_INFO *info, ulonglong test_flag); int chk_size(HA_CHECK *param, MI_INFO *info); int chk_key(HA_CHECK *param, MI_INFO *info); int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend); -int mi_repair(HA_CHECK *param, register MI_INFO *info, +int mi_repair(HA_CHECK *param, MI_INFO *info, char * name, int rep_quick); -int mi_sort_index(HA_CHECK *param, register MI_INFO *info, char * name); -int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info, +int mi_sort_index(HA_CHECK *param, MI_INFO *info, char * name); +int mi_repair_by_sort(HA_CHECK *param, MI_INFO *info, const char * name, int rep_quick); -int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, +int mi_repair_parallel(HA_CHECK *param, MI_INFO *info, const char * name, int rep_quick); int change_to_newfile(const char * filename, const char * old_ext, const char * new_ext, time_t backup_time, myf myflags); diff --git a/sql/derror.cc b/sql/derror.cc index 48fb481f908..b976fff9d4f 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -146,7 +146,7 @@ static bool check_error_mesg(const char *file_name, const char **errmsg) bool read_texts(const char *file_name, const char *language, const char ***point, uint error_messages) { - register uint i; + uint i; uint count,funktpos; size_t offset, length; File file; diff --git a/sql/field.cc b/sql/field.cc index a4c30f8a547..291e2134dcf 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2725,7 +2725,7 @@ int Field_decimal::store(double nr) return 1; } - reg4 uint i; + uint i; size_t length; uchar fyllchar,*to; char buff[DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE]; diff --git a/sql/field.h b/sql/field.h index b93668a7cb4..60849ea8099 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1406,7 +1406,7 @@ public: // Exactly the same rules with REF access return can_optimize_keypart_ref(cond, item); } - friend int cre_myisam(char * name, register TABLE *form, uint options, + friend int cre_myisam(char * name, TABLE *form, uint options, ulonglong auto_increment_value); friend class Copy_field; friend class Item_avg_field; diff --git a/sql/filesort.cc b/sql/filesort.cc index 78103331857..4f195f68059 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -967,12 +967,12 @@ static inline void store_length(uchar *to, uint length, uint pack_length) /** Make a sort-key from record. */ -static void make_sortkey(register Sort_param *param, - register uchar *to, uchar *ref_pos) +static void make_sortkey(Sort_param *param, + uchar *to, uchar *ref_pos) { - reg3 Field *field; - reg1 SORT_FIELD *sort_field; - reg5 uint length; + Field *field; + SORT_FIELD *sort_field; + uint length; for (sort_field=param->local_sortorder ; sort_field != param->end ; @@ -1214,7 +1214,7 @@ static void make_sortkey(register Sort_param *param, static void register_used_fields(Sort_param *param) { - reg1 SORT_FIELD *sort_field; + SORT_FIELD *sort_field; TABLE *table=param->sort_form; MY_BITMAP *bitmap= table->read_set; @@ -1425,7 +1425,7 @@ bool check_if_pq_applicable(Sort_param *param, int merge_many_buff(Sort_param *param, uchar *sort_buffer, BUFFPEK *buffpek, uint *maxbuffer, IO_CACHE *t_file) { - register uint i; + uint i; IO_CACHE t_file2,*from_file,*to_file,*temp; BUFFPEK *lastbuff; DBUG_ENTER("merge_many_buff"); @@ -1483,7 +1483,7 @@ cleanup: uint read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek, uint rec_length) { - register uint count; + uint count; uint length; if ((count=(uint) MY_MIN((ha_rows) buffpek->max_keys,buffpek->count))) @@ -1787,7 +1787,7 @@ int merge_buffers(Sort_param *param, IO_CACHE *from_file, } else { - register uchar *end; + uchar *end; src= buffpek->key+offset; for (end= src+buffpek->mem_count*rec_length ; src != end ; diff --git a/sql/handler.cc b/sql/handler.cc index 3d091401f4b..79f23c0d200 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2834,7 +2834,7 @@ int handler::ha_rnd_init_with_error(bool scan) */ int handler::read_first_row(uchar * buf, uint primary_key) { - register int error; + int error; DBUG_ENTER("handler::read_first_row"); /* diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 2975b046b1c..2e029f307fc 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5901,8 +5901,8 @@ void Item_func_like::turboBM_compute_bad_character_shifts() bool Item_func_like::turboBM_matches(const char* text, int text_len) const { - register int bcShift; - register int turboShift; + int bcShift; + int turboShift; int shift = pattern_len; int j = 0; int u = 0; @@ -5916,7 +5916,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const { while (j <= tlmpl) { - register int i= plm1; + int i= plm1; while (i >= 0 && pattern[i] == text[i + j]) { i--; @@ -5926,7 +5926,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const if (i < 0) return 1; - register const int v = plm1 - i; + const int v = plm1 - i; turboShift = u - v; bcShift = bmBc[(uint) (uchar) text[i + j]] - plm1 + i; shift = MY_MAX(turboShift, bcShift); @@ -5947,7 +5947,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const { while (j <= tlmpl) { - register int i = plm1; + int i = plm1; while (i >= 0 && likeconv(cs,pattern[i]) == likeconv(cs,text[i + j])) { i--; @@ -5957,7 +5957,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const if (i < 0) return 1; - register const int v = plm1 - i; + const int v = plm1 - i; turboShift = u - v; bcShift = bmBc[(uint) likeconv(cs, text[i + j])] - plm1 + i; shift = MY_MAX(turboShift, bcShift); diff --git a/sql/item_func.cc b/sql/item_func.cc index 946ce495a88..1b54db4e68f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3282,8 +3282,8 @@ longlong Item_func_ord::val_int() #ifdef USE_MB if (use_mb(res->charset())) { - register const char *str=res->ptr(); - register uint32 n=0, l=my_ismbchar(res->charset(),str,str+res->length()); + const char *str=res->ptr(); + uint32 n=0, l=my_ismbchar(res->charset(),str,str+res->length()); if (!l) return (longlong)((uchar) *str); while (l--) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index dcef7acb265..f3e19a19b3c 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1039,7 +1039,7 @@ String *Item_func_reverse::val_str(String *str) #ifdef USE_MB if (use_mb(res->charset())) { - register uint32 l; + uint32 l; while (ptr < end) { if ((l= my_ismbchar(res->charset(),ptr,end))) @@ -1088,7 +1088,7 @@ String *Item_func_replace::val_str(String *str) bool alloced=0; #ifdef USE_MB const char *ptr,*end,*strend,*search,*search_end; - register uint32 l; + uint32 l; bool binary_cmp; #endif THD *thd= 0; @@ -1141,7 +1141,7 @@ redo: { if (*ptr == *search) { - register char *i,*j; + char *i,*j; i=(char*) ptr+1; j=(char*) search+1; while (j != search_end) if (*i++ != *j++) goto skip; @@ -1735,14 +1735,14 @@ String *Item_func_substr_index::val_str(String *str) const char *search= delimiter->ptr(); const char *search_end= search+delimiter_length; int32 n=0,c=count,pass; - register uint32 l; + uint32 l; for (pass=(count>0);pass<2;++pass) { while (ptr < end) { if (*ptr == *search) { - register char *i,*j; + char *i,*j; i=(char*) ptr+1; j=(char*) search+1; while (j != search_end) if (*i++ != *j++) goto skip; @@ -1926,7 +1926,7 @@ String *Item_func_rtrim::val_str(String *str) end= ptr+res->length(); #ifdef USE_MB char *p=ptr; - register uint32 l; + uint32 l; #endif if (remove_length == 1) { @@ -2011,7 +2011,7 @@ String *Item_func_trim::val_str(String *str) if (use_mb(collation.collation)) { char *p=ptr; - register uint32 l; + uint32 l; loop: while (ptr + remove_length < end) { diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index d32209b58b8..ab892020e9c 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation #endif diff --git a/sql/key.cc b/sql/key.cc index 5a1b3573f6f..9c59bdf020a 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -54,8 +54,8 @@ using std::max; int find_ref_key(KEY *key, uint key_count, uchar *record, Field *field, uint *key_length, uint *keypart) { - reg2 int i; - reg3 KEY *key_info; + int i; + KEY *key_info; uint fieldpos; fieldpos= field->offset(record); @@ -511,7 +511,7 @@ int key_cmp(KEY_PART_INFO *key_part, const uchar *key, uint key_length) if (key_part->null_bit) { /* This key part allows null values; NULL is lower than everything */ - register bool field_is_null= key_part->field->is_null(); + bool field_is_null= key_part->field->is_null(); if (*key) // If range key is null { /* the range is expecting a null value */ diff --git a/sql/lock.cc b/sql/lock.cc index ba0d75a59e9..07021bae9ca 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -347,7 +347,7 @@ end: static int lock_external(THD *thd, TABLE **tables, uint count) { - reg1 uint i; + uint i; int lock_type,error; DBUG_ENTER("lock_external"); @@ -500,7 +500,7 @@ void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table) { if (locked) { - reg1 uint i; + uint i; for (i=0; i < locked->table_count; i++) { if (locked->table[i] == table) diff --git a/sql/log.cc b/sql/log.cc index f2ee8921dd2..acf1f8f8a9c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2430,7 +2430,7 @@ static int find_uniq_filename(char *name, ulong next_log_number) uint i; char buff[FN_REFLEN], ext_buf[FN_REFLEN]; struct st_my_dir *dir_info; - reg1 struct fileinfo *file_info; + struct fileinfo *file_info; ulong max_found, next, number; size_t buf_length, length; char *start, *end; @@ -8483,10 +8483,9 @@ void MYSQL_BIN_LOG::set_max_size(ulong max_size_arg) 0 String is not a number */ -static bool test_if_number(register const char *str, - ulong *res, bool allow_wildcards) +static bool test_if_number(const char *str, ulong *res, bool allow_wildcards) { - reg2 int flag; + int flag; const char *start; DBUG_ENTER("test_if_number"); diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc index e9456b267c4..0336df6dfe9 100644 --- a/sql/mf_iocache.cc +++ b/sql/mf_iocache.cc @@ -49,7 +49,7 @@ extern "C" { */ -int _my_b_net_read(register IO_CACHE *info, uchar *Buffer, +int _my_b_net_read(IO_CACHE *info, uchar *Buffer, size_t Count __attribute__((unused))) { ulong read_length; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 7880d33975e..ea5e4353c83 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -60,8 +60,8 @@ #define EXTRA_DEBUG_fflush fflush #define EXTRA_DEBUG_ASSERT DBUG_ASSERT #else -static void inline EXTRA_DEBUG_fprintf(...) {} -static int inline EXTRA_DEBUG_fflush(...) { return 0; } +#define EXTRA_DEBUG_fprintf(...) +#define EXTRA_DEBUG_fflush(...) #define EXTRA_DEBUG_ASSERT(X) do {} while(0) #endif #ifdef MYSQL_SERVER diff --git a/sql/plistsort.c b/sql/plistsort.c index 9f9402a79d8..6efea273963 100644 --- a/sql/plistsort.c +++ b/sql/plistsort.c @@ -91,7 +91,7 @@ recursion_point: } { - register struct LS_STRUCT_NAME *sp0= sp++; + struct LS_STRUCT_NAME *sp0= sp++; sp->list_len= sp0->list_len >> 1; sp0->list_len-= sp->list_len; sp->return_point= 0; @@ -100,7 +100,7 @@ recursion_point: return_point0: sp->list1= sorted_list; { - register struct LS_STRUCT_NAME *sp0= sp++; + struct LS_STRUCT_NAME *sp0= sp++; list= list_end; sp->list_len= sp0->list_len; sp->return_point= 1; @@ -108,9 +108,9 @@ return_point0: goto recursion_point; return_point1: { - register LS_LIST_ITEM **hook= &sorted_list; - register LS_LIST_ITEM *list1= sp->list1; - register LS_LIST_ITEM *list2= sorted_list; + LS_LIST_ITEM **hook= &sorted_list; + LS_LIST_ITEM *list1= sp->list1; + LS_LIST_ITEM *list2= sorted_list; if (LS_COMPARE_FUNC_CALL(list1, list2)) { diff --git a/sql/records.cc b/sql/records.cc index 4825cb9ea93..795f1197840 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -622,7 +622,7 @@ static int init_rr_cache(THD *thd, READ_RECORD *info) static int rr_from_cache(READ_RECORD *info) { - reg1 uint i; + uint i; ulong length; my_off_t rest_of_file; int16 error; diff --git a/sql/slave.cc b/sql/slave.cc index 0330c151fd2..0ebed343a3d 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -217,7 +217,7 @@ static void set_slave_max_allowed_packet(THD *thd, MYSQL *mysql) void init_thread_mask(int* mask,Master_info* mi,bool inverse) { bool set_io = mi->slave_running, set_sql = mi->rli.slave_running; - register int tmp_mask=0; + int tmp_mask=0; DBUG_ENTER("init_thread_mask"); if (set_io) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index de5a9f413de..253b070a9b5 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -10629,7 +10629,7 @@ int fill_schema_applicable_roles(THD *thd, TABLE_LIST *tables, COND *cond) int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *wildstr) { - reg3 int flag; + int flag; DBUG_ENTER("wild_case_compare"); DBUG_PRINT("enter",("str: '%s' wildstr: '%s'",str,wildstr)); while (*wildstr) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d49fbcddbf9..335d3a9dfce 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -8011,7 +8011,7 @@ bool setup_fields(THD *thd, Item **ref_pointer_array, List<Item> *sum_func_list, List<Item> *pre_fix, bool allow_sum_func) { - reg2 Item *item; + Item *item; enum_mark_columns save_mark_used_columns= thd->mark_used_columns; nesting_map save_allow_sum_func= thd->lex->allow_sum_func; List_iterator<Item> it(fields); diff --git a/sql/sql_class.h b/sql/sql_class.h index 63923945dd5..e3bc572ed0c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -5196,7 +5196,7 @@ public: inline static int get_cost_calc_buff_size(size_t nkeys, uint key_size, ulonglong max_in_memory_size) { - register ulonglong max_elems_in_tree= + ulonglong max_elems_in_tree= max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size); return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree)); } diff --git a/sql/sql_db.cc b/sql/sql_db.cc index c0c8c57b46e..b1a82ab090d 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -338,7 +338,7 @@ static void del_dbopt(const char *path) static bool write_db_opt(THD *thd, const char *path, Schema_specification_st *create) { - register File file; + File file; char buf[256]; // Should be enough for one option bool error=1; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0be8abf4842..da76f10596d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -87,7 +87,7 @@ static int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic, LEX_STRING query, bool ignore, bool log_on); static void end_delayed_insert(THD *thd); pthread_handler_t handle_delayed_insert(void *arg); -static void unlink_blobs(register TABLE *table); +static void unlink_blobs(TABLE *table); #endif static bool check_view_insertability(THD *thd, TABLE_LIST *view); @@ -3081,7 +3081,7 @@ pthread_handler_t handle_delayed_insert(void *arg) /* Remove pointers from temporary fields to allocated values */ -static void unlink_blobs(register TABLE *table) +static void unlink_blobs(TABLE *table) { for (Field **ptr=table->field ; *ptr ; ptr++) { @@ -3092,7 +3092,7 @@ static void unlink_blobs(register TABLE *table) /* Free blobs stored in current row */ -static void free_delayed_insert_blobs(register TABLE *table) +static void free_delayed_insert_blobs(TABLE *table) { for (Field **ptr=table->field ; *ptr ; ptr++) { diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 64406f54005..15ae6c67e22 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1001,7 +1001,7 @@ Lex_input_stream::unescape(CHARSET_INFO *cs, char *to, bool Lex_input_stream::get_text(LEX_STRING *dst, uint sep, int pre_skip, int post_skip) { - reg1 uchar c; + uchar c; uint found_escape=0; CHARSET_INFO *cs= m_thd->charset(); @@ -1181,7 +1181,7 @@ static inline uint int_token(const char *str,uint length) */ bool consume_comment(Lex_input_stream *lip, int remaining_recursions_permitted) { - reg1 uchar c; + uchar c; while (! lip->eof()) { c= lip->yyGet(); @@ -1283,7 +1283,7 @@ int MYSQLlex(YYSTYPE *yylval, THD *thd) static int lex_one_token(YYSTYPE *yylval, THD *thd) { - reg1 uchar UNINIT_VAR(c); + uchar UNINIT_VAR(c); bool comment_closed; int tokval, result_state; uint length; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c8b9219c280..91f91cbb315 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7360,7 +7360,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, List<String> *partition_names, LEX_STRING *option) { - register TABLE_LIST *ptr; + TABLE_LIST *ptr; TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */ char *alias_str; LEX *lex= thd->lex; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 320eddf1e66..2c6aeda794a 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -404,7 +404,7 @@ static bool send_prep_stmt(Prepared_statement *stmt, static ulong get_param_length(uchar **packet, ulong len) { - reg1 uchar *pos= *packet; + uchar *pos= *packet; if (len < 1) return 0; if (*pos < 251) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 954080cbc11..b9d8290b4ec 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -358,7 +358,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result, ulong setup_tables_done_option) { bool res; - register SELECT_LEX *select_lex = &lex->select_lex; + SELECT_LEX *select_lex = &lex->select_lex; DBUG_ENTER("handle_select"); MYSQL_SELECT_START(thd->query()); diff --git a/sql/sql_string.cc b/sql/sql_string.cc index b6ce89e1471..d03ed5be02f 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -608,8 +608,8 @@ int String::strstr(const String &s,uint32 offset) if (!s.length()) return ((int) offset); // Empty string is always found - register const char *str = Ptr+offset; - register const char *search=s.ptr(); + const char *str = Ptr+offset; + const char *search=s.ptr(); const char *end=Ptr+str_length-s.length()+1; const char *search_end=s.ptr()+s.length(); skip: @@ -617,7 +617,7 @@ skip: { if (*str++ == *search) { - register char *i,*j; + char *i,*j; i=(char*) str; j=(char*) search+1; while (j != search_end) if (*i++ != *j++) goto skip; @@ -638,8 +638,8 @@ int String::strrstr(const String &s,uint32 offset) { if (!s.length()) return offset; // Empty string is always found - register const char *str = Ptr+offset-1; - register const char *search=s.ptr()+s.length()-1; + const char *str = Ptr+offset-1; + const char *search=s.ptr()+s.length()-1; const char *end=Ptr+s.length()-2; const char *search_end=s.ptr()-1; @@ -648,7 +648,7 @@ skip: { if (*str-- == *search) { - register char *i,*j; + char *i,*j; i=(char*) str; j=(char*) search-1; while (j != search_end) if (*i-- != *j--) goto skip; diff --git a/sql/table.cc b/sql/table.cc index 12b23304acd..91b321930ab 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -3063,7 +3063,7 @@ partititon_err: free_share Is 1 if we also want to free table_share */ -int closefrm(register TABLE *table, bool free_share) +int closefrm(TABLE *table, bool free_share) { int error=0; DBUG_ENTER("closefrm"); @@ -3111,7 +3111,7 @@ int closefrm(register TABLE *table, bool free_share) /* Deallocate temporary blob storage */ -void free_blobs(register TABLE *table) +void free_blobs(TABLE *table) { uint *ptr, *end; for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ; diff --git a/sql/uniques.cc b/sql/uniques.cc index 8da9ca2fe68..03f25d31384 100644 --- a/sql/uniques.cc +++ b/sql/uniques.cc @@ -208,7 +208,7 @@ static double get_merge_many_buffs_cost(uint *buffer, uint last_n_elems, int elem_size, uint compare_factor) { - register int i; + int i; double total_cost= 0.0; uint *buff_elems= buffer; /* #s of elements in each of merged sequences */ diff --git a/sql/unireg.cc b/sql/unireg.cc index 3cef6f225bc..b9abe3da1b9 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -751,7 +751,6 @@ static bool pack_fields(uchar *buff, List<Create_field> &create_fields, recpos= field->offset+1 + (uint) data_offset; int3store(buff+5,recpos); int2store(buff+8,field->pack_flag); - DBUG_ASSERT(field->unireg_check < 256); buff[10]= (uchar) field->unireg_check; buff[12]= (uchar) field->interval_id; buff[13]= (uchar) field->sql_type; diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index cd1785b48ac..483139bc955 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -457,7 +457,7 @@ char *ARRAY::GetStringValue(int n) /***********************************************************************/ bool ARRAY::Find(PVAL valp) { - register int n; + int n; PVAL vp; if (Type != valp->GetType()) { @@ -1065,7 +1065,7 @@ MULAR::MULAR(PGLOBAL g, int n) : CSORT(false) /***********************************************************************/ int MULAR::Qcompare(int *i1, int *i2) { - register int i, n = 0; + int i, n = 0; for (i = 0; i < Narray; i++) if ((n = Pars[i]->Qcompare(i1, i2))) diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp index 670131b8fd2..1e4ba674e23 100644 --- a/storage/connect/csort.cpp +++ b/storage/connect/csort.cpp @@ -178,9 +178,9 @@ void CSORT::DebugSort(int ph, int n, int *base, int *mid, int *tmp) /***********************************************************************/ int CSORT::Qsortx(void) { - register int c; - register int lo, hi, min; - register int i, j, rc = 0; + int c; + int lo, hi, min; + int i, j, rc = 0; // To do: rc should be checked for being used uninitialized int *top; #ifdef DEBTRACE @@ -344,7 +344,7 @@ int CSORT::Qsortx(void) /***********************************************************************/ void CSORT::Qstx(int *base, int *max) { - register int *i, *j, *jj, *mid, *him, c; + int *i, *j, *jj, *mid, *him, c; int *tmp; int lo, hi, rc; size_t zlo, zhi, cnm; @@ -543,9 +543,9 @@ void CSORT::Qstx(int *base, int *max) /***********************************************************************/ int CSORT::Qsortc(void) { - register int c; - register int lo, hi, min; - register int i, j, k, m, rc = 0; + int c; + int lo, hi, min; + int i, j, k, m, rc = 0; // To do: rc should be checked for being used uninitialized int *max; #ifdef DEBTRACE @@ -720,7 +720,7 @@ int CSORT::Qsortc(void) /***********************************************************************/ void CSORT::Qstc(int *base, int *max) { - register int *i, *j, *jj, *lt, *eq, *gt, *mid; + int *i, *j, *jj, *lt, *eq, *gt, *mid; int c = 0, lo, hi, rc; size_t zlo, zhi, cnm; @@ -907,9 +907,9 @@ void CSORT::Qstc(int *base, int *max) /***********************************************************************/ void CSORT::Istc(int *base, int *hi, int *max) { - register int c = 0; - register int *lo; - register int *i, *j; + int c = 0; + int *lo; + int *i, *j; /*********************************************************************/ /* First put smallest element, which must be in the first THRESH, */ diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index dd88b482822..40f9e90ff35 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -3071,7 +3071,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; @@ -3101,7 +3101,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) strncat(s, res->ptr(), res->length()); if (res->length() < 19) - strcat(s, "1970-01-01 00:00:00" + res->length()); + strcat(s, &"1970-01-01 00:00:00"[res->length()]); strcat(s, "'}"); break; diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 6687513fa6c..d08c6d1b7a5 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -2279,7 +2279,7 @@ int ODBConn::GetCatInfo(CATPARM *cap) int i, irc; bool b; PCSZ fnc = "Unknown"; - UWORD n; + UWORD n = 0; SWORD ncol, len, tp; SQLULEN crow = 0; PQRYRES qrp = cap->Qrp; diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index 73ca135691c..5179fa654cf 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -511,7 +511,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, int k, int n) CheckType(pv) TYPE *lp = ((TYPBLK*)pv)->Typp; - for (register int i = k; i < n; i++) // TODO + for (int i = k; i < n; i++) // TODO Typp[i] = lp[i]; } // end of SetValues @@ -805,7 +805,7 @@ void CHRBLK::SetValue(const char *sp, uint len, int n) if (Blanks) { // Suppress eventual ending zero and right fill with blanks - for (register int i = len; i < Long; i++) + for (int i = len; i < Long; i++) p[i] = ' '; } else if ((signed)len < Long) diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index efefc17b5f5..db4d6cbb00d 100644 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -272,8 +272,8 @@ void XINDEX::Close(void) /***********************************************************************/ int XINDEX::Qcompare(int *i1, int *i2) { - register int k; - register PXCOL kcp; + int k; + PXCOL kcp; for (kcp = To_KeyCol, k = 0; kcp; kcp = kcp->Next) if ((k = kcp->Compare(*i1, *i2))) @@ -745,7 +745,7 @@ int XINDEX::ColMaxSame(PXCOL kp) /***********************************************************************/ bool XINDEX::Reorder(PGLOBAL g __attribute__((unused))) { - register int i, j, k, n; + int i, j, k, n; bool sorted = true; PXCOL kcp; #if 0 @@ -1870,8 +1870,8 @@ int XINDEX::Fetch(PGLOBAL g) /***********************************************************************/ int XINDEX::FastFind(void) { - register int curk, sup, inf, i= 0, k, n = 2; - register PXCOL kp, kcp; + int curk, sup, inf, i= 0, k, n = 2; + PXCOL kp, kcp; //assert((int)nv == Nval); @@ -2209,8 +2209,8 @@ int XINDXS::Fetch(PGLOBAL g) /***********************************************************************/ int XINDXS::FastFind(void) { - register int sup, inf, i= 0, n = 2; - register PXCOL kcp = To_KeyCol; + int sup, inf, i= 0, n = 2; + PXCOL kcp = To_KeyCol; if (Nblk && Op == OP_EQ) { // Look in block values to find in which block to search @@ -3235,7 +3235,7 @@ void KXYCOL::FillValue(PVAL valp) int KXYCOL::Compare(int i1, int i2) { // Do the actual comparison between values. - register int k = Kblp->CompVal(i1, i2); + int k = Kblp->CompVal(i1, i2); if (trace(4)) htrc("Compare done result=%d\n", k); @@ -3250,7 +3250,7 @@ int KXYCOL::CompVal(int i) { // Do the actual comparison between numerical values. if (trace(4)) { - register int k = (int)Kblp->CompVal(Valp, (int)i); + int k = (int)Kblp->CompVal(Valp, (int)i); htrc("Compare done result=%d\n", k); return k; diff --git a/storage/heap/heapdef.h b/storage/heap/heapdef.h index 0c1b5f8460f..430fdaa8949 100644 --- a/storage/heap/heapdef.h +++ b/storage/heap/heapdef.h @@ -97,7 +97,7 @@ extern uint hp_rb_key_length(HP_KEYDEF *keydef, const uchar *key); extern uint hp_rb_null_key_length(HP_KEYDEF *keydef, const uchar *key); extern uint hp_rb_var_key_length(HP_KEYDEF *keydef, const uchar *key); extern my_bool hp_if_null_in_key(HP_KEYDEF *keyinfo, const uchar *record); -extern int hp_close(register HP_INFO *info); +extern int hp_close(HP_INFO *info); extern void hp_clear(HP_SHARE *info); extern void hp_clear_keys(HP_SHARE *info); extern uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 361bdaca0c0..a417828f242 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -208,7 +208,7 @@ class ha_innobase: public handler char* remote_path); const char* check_table_options(THD *thd, TABLE* table, HA_CREATE_INFO* create_info, const bool use_tablespace, const ulint file_format); - int create(const char *name, register TABLE *form, + int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info); int truncate(); int delete_table(const char *name); diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 77946d8e107..5f73a1dc1af 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -3044,7 +3044,7 @@ static enum data_file_type maria_row_type(HA_CREATE_INFO *info) } -int ha_maria::create(const char *name, register TABLE *table_arg, +int ha_maria::create(const char *name, TABLE *table_arg, HA_CREATE_INFO *ha_create_info) { int error; diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h index 389e6c8b3d8..a8eaeef7bcc 100644 --- a/storage/maria/ma_blockrec.h +++ b/storage/maria/ma_blockrec.h @@ -190,8 +190,7 @@ MARIA_RECORD_POS _ma_write_init_block_record(MARIA_HA *info, const uchar *record); my_bool _ma_write_block_record(MARIA_HA *info, const uchar *record); my_bool _ma_write_abort_block_record(MARIA_HA *info); -my_bool _ma_compare_block_record(register MARIA_HA *info, - register const uchar *record); +my_bool _ma_compare_block_record(MARIA_HA *info, const uchar *record); void _ma_compact_block_page(MARIA_SHARE *share, uchar *buff, uint rownr, my_bool extend_block, TrID min_read_from, uint min_row_length); diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 1c9452e8cfa..0a58a0a1786 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -109,7 +109,7 @@ typedef struct st_maria_sort_param int (*key_read)(struct st_maria_sort_param *, uchar *); int (*key_write)(struct st_maria_sort_param *, const uchar *); void (*lock_in_memory)(HA_CHECK *); - int (*write_keys)(struct st_maria_sort_param *, register uchar **, + int (*write_keys)(struct st_maria_sort_param *, uchar **, ulonglong , struct st_buffpek *, IO_CACHE *); my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint); int (*write_key)(struct st_maria_sort_param *, IO_CACHE *,uchar *, @@ -1040,7 +1040,7 @@ my_off_t _ma_no_keypos_to_recpos(MARIA_SHARE *share, my_off_t pos); extern my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key); extern my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, MARIA_RECORD_POS *root); -int _ma_insert(register MARIA_HA *info, MARIA_KEY *key, +int _ma_insert(MARIA_HA *info, MARIA_KEY *key, MARIA_PAGE *anc_page, uchar *key_pos, uchar *key_buff, MARIA_PAGE *father_page, uchar *father_key_pos, my_bool insert_last); @@ -1082,7 +1082,7 @@ extern void _ma_store_bin_pack_key(MARIA_KEYDEF *keyinfo, uchar *key_pos, MARIA_KEY_PARAM *s_temp); extern my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key); -extern my_bool _ma_ck_real_delete(register MARIA_HA *info, MARIA_KEY *key, +extern my_bool _ma_ck_real_delete(MARIA_HA *info, MARIA_KEY *key, my_off_t *root); extern int _ma_readinfo(MARIA_HA *info, int lock_flag, int check_keybuffer); extern int _ma_writeinfo(MARIA_HA *info, uint options); @@ -1154,7 +1154,7 @@ extern my_bool _ma_fetch_keypage(MARIA_PAGE *page, MARIA_HA *info, extern my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock, int level); extern int _ma_dispose(MARIA_HA *info, my_off_t pos, my_bool page_not_read); -extern my_off_t _ma_new(register MARIA_HA *info, int level, +extern my_off_t _ma_new(MARIA_HA *info, int level, MARIA_PINNED_PAGE **page_link); extern my_bool _ma_compact_keypage(MARIA_PAGE *page, TrID min_read_from); extern uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid); @@ -1342,7 +1342,7 @@ extern MARIA_HA *_ma_test_if_reopen(const char *filename); my_bool _ma_check_table_is_closed(const char *name, const char *where); int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share); int _ma_open_keyfile(MARIA_SHARE *share); -void _ma_setup_functions(register MARIA_SHARE *share); +void _ma_setup_functions(MARIA_SHARE *share); my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size); void _ma_remap_file(MARIA_HA *info, my_off_t size); @@ -1424,7 +1424,7 @@ extern my_bool maria_flush_log_for_page_none(PAGECACHE_IO_HOOK_ARGS *args); extern PAGECACHE *maria_log_pagecache; extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func, void *func_arg); -ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record); +ICP_RESULT ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record); extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx); extern my_bool ma_killed_standalone(MARIA_HA *); diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 3b2e9998be7..bfa85abb7d9 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -2016,7 +2016,7 @@ void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) } -int ha_myisam::create(const char *name, register TABLE *table_arg, +int ha_myisam::create(const char *name, TABLE *table_arg, HA_CREATE_INFO *ha_create_info) { int error; diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index 67d60d7b1b5..e0e8bcefd65 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -536,8 +536,7 @@ extern uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length); extern uint _mi_keylength(MI_KEYDEF *keyinfo, uchar *key); -extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key, - HA_KEYSEG *end); +extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, uchar *key, HA_KEYSEG *end); extern uchar *_mi_move_key(MI_KEYDEF *keyinfo, uchar *to, uchar *from); extern int _mi_search_next(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uint nextflag, my_off_t pos); @@ -716,12 +715,12 @@ my_bool check_table_is_closed(const char *name, const char *where); int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share); int mi_open_keyfile(MYISAM_SHARE *share); -void mi_setup_functions(register MYISAM_SHARE *share); +void mi_setup_functions(MYISAM_SHARE *share); my_bool mi_dynmap_file(MI_INFO *info, my_off_t size); int mi_munmap_file(MI_INFO *info); void mi_remap_file(MI_INFO *info, my_off_t size); -ICP_RESULT mi_check_index_cond(register MI_INFO *info, uint keynr, uchar *record); +ICP_RESULT mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record); /* Functions needed by mi_check */ int killed_ptr(HA_CHECK *param); void mi_check_print_error(HA_CHECK *param, const char *fmt, ...); diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 3cb66a8b94c..4cc4aca3f90 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -1567,7 +1567,7 @@ int ha_myisammrg::create_mrg(const char *name, HA_CREATE_INFO *create_info) } -int ha_myisammrg::create(const char *name, register TABLE *form, +int ha_myisammrg::create(const char *name, TABLE *form, HA_CREATE_INFO *create_info) { char buff[FN_REFLEN]; diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc index e73e65ce059..fa19f89f9d6 100644 --- a/storage/perfschema/pfs.cc +++ b/storage/perfschema/pfs.cc @@ -2214,7 +2214,7 @@ start_mutex_wait_v1(PSI_mutex_locker_state *state, if (! pfs_mutex->m_enabled) return NULL; - register uint flags; + uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -2312,7 +2312,7 @@ start_rwlock_wait_v1(PSI_rwlock_locker_state *state, if (! pfs_rwlock->m_enabled) return NULL; - register uint flags; + uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -2420,7 +2420,7 @@ start_cond_wait_v1(PSI_cond_locker_state *state, if (! pfs_cond->m_enabled) return NULL; - register uint flags; + uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -2564,7 +2564,7 @@ start_table_io_wait_v1(PSI_table_locker_state *state, PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); - register uint flags; + uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -2690,7 +2690,7 @@ start_table_lock_wait_v1(PSI_table_locker_state *state, DBUG_ASSERT((uint) lock_type < array_elements(table_lock_operation_map)); - register uint flags; + uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -2798,7 +2798,7 @@ get_thread_file_name_locker_v1(PSI_file_locker_state *state, if (flag_thread_instrumentation && ! pfs_thread->m_enabled) return NULL; - register uint flags; + uint flags; state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); flags= STATE_FLAG_THREAD; @@ -2867,7 +2867,7 @@ get_thread_file_stream_locker_v1(PSI_file_locker_state *state, if (! pfs_file->m_enabled) return NULL; - register uint flags; + uint flags; if (flag_thread_instrumentation) { @@ -2973,7 +2973,7 @@ get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state, DBUG_ASSERT(pfs_file->m_class != NULL); PFS_file_class *klass= pfs_file->m_class; - register uint flags; + uint flags; if (flag_thread_instrumentation) { @@ -3062,7 +3062,7 @@ start_socket_wait_v1(PSI_socket_locker_state *state, if (!pfs_socket->m_enabled || pfs_socket->m_idle) return NULL; - register uint flags= 0; + uint flags= 0; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -3321,7 +3321,7 @@ start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_ if (!global_idle_class.m_enabled) return NULL; - register uint flags= 0; + uint flags= 0; ulonglong timer_start= 0; if (flag_thread_instrumentation) @@ -3403,7 +3403,7 @@ static void end_idle_wait_v1(PSI_idle_locker* locker) ulonglong timer_end= 0; ulonglong wait_time= 0; - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -3473,7 +3473,7 @@ static void end_mutex_wait_v1(PSI_mutex_locker* locker, int rc) DBUG_ASSERT(mutex != NULL); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -3794,7 +3794,7 @@ static void end_table_io_wait_v1(PSI_table_locker* locker) break; } - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -3865,7 +3865,7 @@ static void end_table_lock_wait_v1(PSI_table_locker* locker) PFS_single_stat *stat= & table->m_table_stat.m_lock_stat.m_stat[state->m_index]; - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -4028,7 +4028,7 @@ static void start_file_wait_v1(PSI_file_locker *locker, PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); DBUG_ASSERT(state != NULL); - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -4064,7 +4064,7 @@ static void end_file_wait_v1(PSI_file_locker *locker, ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_byte_stat *byte_stat; - register uint flags= state->m_flags; + uint flags= state->m_flags; size_t bytes= ((int)byte_count > -1 ? byte_count : 0); PFS_file_stat *file_stat; @@ -4419,7 +4419,7 @@ get_thread_statement_locker_v1(PSI_statement_locker_state *state, if (! klass->m_enabled) return NULL; - register uint flags; + uint flags; if (flag_thread_instrumentation) { @@ -4596,7 +4596,7 @@ static void start_statement_v1(PSI_statement_locker *locker, PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); DBUG_ASSERT(state != NULL); - register uint flags= state->m_flags; + uint flags= state->m_flags; ulonglong timer_start= 0; if (flags & STATE_FLAG_TIMED) @@ -4798,7 +4798,7 @@ static void end_statement_v1(PSI_statement_locker *locker, void *stmt_da) ulonglong timer_end= 0; ulonglong wait_time= 0; - register uint flags= state->m_flags; + uint flags= state->m_flags; if (flags & STATE_FLAG_TIMED) { @@ -5024,7 +5024,7 @@ static void end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count) ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_byte_stat *byte_stat; - register uint flags= state->m_flags; + uint flags= state->m_flags; size_t bytes= ((int)byte_count > -1 ? byte_count : 0); switch (state->m_operation) diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index 009c6a0e603..8ca12883f9d 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -80,7 +80,7 @@ inline uint randomized_index(const void *ptr, uint max_size) static uint seed1= 0; static uint seed2= 0; uint result; - register intptr value; + intptr value; if (unlikely(max_size == 0)) return 0; diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index e57215fb46b..9726afdd66e 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -6302,7 +6302,7 @@ int spider_panic( int spider_db_init( void *p ) { - int error_num, roop_count; + int error_num = 0, roop_count; uint dbton_id = 0; handlerton *spider_hton = (handlerton *)p; DBUG_ENTER("spider_db_init"); |