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 /storage/perfschema | |
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.
Diffstat (limited to 'storage/perfschema')
-rw-r--r-- | storage/perfschema/pfs.cc | 40 | ||||
-rw-r--r-- | storage/perfschema/pfs_global.h | 2 |
2 files changed, 21 insertions, 21 deletions
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; |