From ede047f0fa231105d18d1071867f3bbb96ee0df7 Mon Sep 17 00:00:00 2001 From: Alexey Antipovsky Date: Thu, 12 Nov 2020 14:11:48 +0000 Subject: [PATCH] Fix warnings on CentOS7 --- dbcon/mysql/ha_mcs.cpp | 2 ++ writeengine/server/we_dmlcommandproc.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dbcon/mysql/ha_mcs.cpp b/dbcon/mysql/ha_mcs.cpp index 9a92e7687..af73421b1 100644 --- a/dbcon/mysql/ha_mcs.cpp +++ b/dbcon/mysql/ha_mcs.cpp @@ -1868,6 +1868,8 @@ static int columnstore_init_func(void* p) #ifdef HAVE_PSI_INTERFACE uint count = sizeof(all_mutexes)/sizeof(all_mutexes[0]); mysql_mutex_register("ha_mcs_cache", all_mutexes, count); +#else + (void)key_LOCK_cache_share; #endif mysql_mutex_init(key_LOCK_cache_share, &LOCK_cache_share, MY_MUTEX_INIT_FAST); diff --git a/writeengine/server/we_dmlcommandproc.cpp b/writeengine/server/we_dmlcommandproc.cpp index 1cfcd712b..2592e58c9 100644 --- a/writeengine/server/we_dmlcommandproc.cpp +++ b/writeengine/server/we_dmlcommandproc.cpp @@ -1842,9 +1842,10 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs, { bs >> val8; + // FIXME: IDK what would it mean if valN are unsigned if (utils::is_negative(val8) && - val8 != static_cast(joblist::TINYINTEMPTYROW) && - val8 != static_cast(joblist::TINYINTNULL)) + val8 != joblist::TINYINTEMPTYROW && + val8 != joblist::TINYINTNULL) { val8 = 0; pushWarning = true; @@ -1857,8 +1858,8 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs, bs >> val16; if (utils::is_negative(val16) && - val16 != static_cast(joblist::SMALLINTEMPTYROW) && - val16 != static_cast(joblist::SMALLINTNULL)) + val16 != joblist::SMALLINTEMPTYROW && + val16 != joblist::SMALLINTNULL) { val16 = 0; pushWarning = true; @@ -1953,6 +1954,7 @@ uint8_t WE_DMLCommandProc::processBatchInsertBinary(messageqcpp::ByteStream& bs, } } + // FIXME: colValue is uint64_t (8 bytes) memcpy(&colValue, valStr.c_str(), valStr.length()); break;