You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Fix clang 16 warnings for comfort build
This commit is contained in:
@ -231,7 +231,7 @@ IF (MASK_LONGDOUBLE)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-enum-enum-conversion -Wno-register")
|
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-enum-enum-conversion -Wno-register -Wno-typedef-redefinition")
|
||||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-register")
|
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-register")
|
||||||
endif()
|
endif()
|
||||||
|
@ -10,7 +10,7 @@ FLEX_TARGET(ddl_scan ddl.l ${CMAKE_CURRENT_BINARY_DIR}/ddl-scan.cpp COMPILE_FLAG
|
|||||||
ADD_FLEX_BISON_DEPENDENCY(ddl_scan ddl_gram)
|
ADD_FLEX_BISON_DEPENDENCY(ddl_scan ddl_gram)
|
||||||
|
|
||||||
set_source_files_properties(ddl-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
|
set_source_files_properties(ddl-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
|
||||||
|
set_source_files_properties(ddl-gram.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
|
||||||
########### next target ###############
|
########### next target ###############
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # to pick up flex/bison output
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # to pick up flex/bison output
|
||||||
|
@ -11,7 +11,7 @@ FLEX_TARGET(dml_scan dml.l ${CMAKE_CURRENT_BINARY_DIR}/dml-scan.cpp COMPILE_FLAG
|
|||||||
ADD_FLEX_BISON_DEPENDENCY(dml_scan dml_gram)
|
ADD_FLEX_BISON_DEPENDENCY(dml_scan dml_gram)
|
||||||
|
|
||||||
set_source_files_properties(dml-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
|
set_source_files_properties(dml-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
|
||||||
|
set_source_files_properties(dml-gram.cpp PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
|
||||||
########### next target ###############
|
########### next target ###############
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # to pick up flex/bison output
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # to pick up flex/bison output
|
||||||
|
@ -2051,7 +2051,6 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(JobInfo& jobInfo, vector<Ro
|
|||||||
// if so, replace the "-1" to actual position in returned vec.
|
// if so, replace the "-1" to actual position in returned vec.
|
||||||
AGG_MAP aggDupFuncMap;
|
AGG_MAP aggDupFuncMap;
|
||||||
projColsUDAFIdx = 0;
|
projColsUDAFIdx = 0;
|
||||||
int64_t multiParms = 0;
|
|
||||||
|
|
||||||
// copy over the groupby vector
|
// copy over the groupby vector
|
||||||
// update the outputColumnIndex if returned
|
// update the outputColumnIndex if returned
|
||||||
@ -2096,7 +2095,6 @@ void TupleAggregateStep::prep1PhaseDistinctAggregate(JobInfo& jobInfo, vector<Ro
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip on final agg.: Extra parms for an aggregate have no work there.
|
// Skip on final agg.: Extra parms for an aggregate have no work there.
|
||||||
++multiParms;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4324,7 +4322,6 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(JobInfo& jobInfo, vector<R
|
|||||||
// Keep a count of the parms after the first for any aggregate.
|
// Keep a count of the parms after the first for any aggregate.
|
||||||
// These will be skipped and the count needs to be subtracted
|
// These will be skipped and the count needs to be subtracted
|
||||||
// from where the aux column will be.
|
// from where the aux column will be.
|
||||||
int64_t multiParms = 0;
|
|
||||||
projColsUDAFIdx = 0;
|
projColsUDAFIdx = 0;
|
||||||
// check if the count column for AVG is also a returned column,
|
// check if the count column for AVG is also a returned column,
|
||||||
// if so, replace the "-1" to actual position in returned vec.
|
// if so, replace the "-1" to actual position in returned vec.
|
||||||
@ -4372,7 +4369,6 @@ void TupleAggregateStep::prep2PhasesDistinctAggregate(JobInfo& jobInfo, vector<R
|
|||||||
aggDupFuncMap.erase(it);
|
aggDupFuncMap.erase(it);
|
||||||
}
|
}
|
||||||
// Skip further UM porocessing of the multi-parm: Extra parms for an aggregate have no work on the UM
|
// Skip further UM porocessing of the multi-parm: Extra parms for an aggregate have no work on the UM
|
||||||
++multiParms;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -906,12 +906,10 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector<COND*>& c
|
|||||||
List_iterator_fast<Item> value_it(thd->lex->value_list);
|
List_iterator_fast<Item> value_it(thd->lex->value_list);
|
||||||
updateCP->queryType(CalpontSelectExecutionPlan::UPDATE);
|
updateCP->queryType(CalpontSelectExecutionPlan::UPDATE);
|
||||||
ci->stats.fQueryType = updateCP->queryType();
|
ci->stats.fQueryType = updateCP->queryType();
|
||||||
uint32_t cnt = 0;
|
|
||||||
tr1::unordered_set<string> timeStampColumnNames;
|
tr1::unordered_set<string> timeStampColumnNames;
|
||||||
|
|
||||||
while ((item = (Item_field*)field_it++))
|
while ((item = (Item_field*)field_it++))
|
||||||
{
|
{
|
||||||
cnt++;
|
|
||||||
|
|
||||||
string tmpTableName = bestTableName(item);
|
string tmpTableName = bestTableName(item);
|
||||||
|
|
||||||
|
@ -388,7 +388,6 @@ void* thr_popper(ioManager* arg)
|
|||||||
utils::setThreadName("thr_popper");
|
utils::setThreadName("thr_popper");
|
||||||
ioManager* iom = arg;
|
ioManager* iom = arg;
|
||||||
FileBufferMgr* fbm;
|
FileBufferMgr* fbm;
|
||||||
int totalRqst = 0;
|
|
||||||
fileRequest* fr = 0;
|
fileRequest* fr = 0;
|
||||||
BRM::LBID_t lbid = 0;
|
BRM::LBID_t lbid = 0;
|
||||||
BRM::OID_t oid = 0;
|
BRM::OID_t oid = 0;
|
||||||
@ -748,7 +747,6 @@ void* thr_popper(ioManager* arg)
|
|||||||
|
|
||||||
longSeekOffset = (uint64_t)offset * (uint64_t)fileBlockSize;
|
longSeekOffset = (uint64_t)offset * (uint64_t)fileBlockSize;
|
||||||
lldiv_t cmpOffFact = lldiv(longSeekOffset, (4LL * 1024LL * 1024LL));
|
lldiv_t cmpOffFact = lldiv(longSeekOffset, (4LL * 1024LL * 1024LL));
|
||||||
totalRqst++;
|
|
||||||
|
|
||||||
uint32_t readCount = 0;
|
uint32_t readCount = 0;
|
||||||
uint32_t bytesRead = 0;
|
uint32_t bytesRead = 0;
|
||||||
|
@ -79,7 +79,7 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader* h, TokenB
|
|||||||
const uint8_t* niceBlock; // block cast to a byte-indexed type
|
const uint8_t* niceBlock; // block cast to a byte-indexed type
|
||||||
const uint8_t* niceInput; // h cast to a byte-indexed type
|
const uint8_t* niceInput; // h cast to a byte-indexed type
|
||||||
const uint16_t* offsets;
|
const uint16_t* offsets;
|
||||||
int offsetIndex, argIndex, argsOffset;
|
int offsetIndex, argsOffset;
|
||||||
bool cmpResult = false;
|
bool cmpResult = false;
|
||||||
int i;
|
int i;
|
||||||
const char* sig;
|
const char* sig;
|
||||||
@ -122,7 +122,6 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader* h, TokenB
|
|||||||
siglen = offsets[offsetIndex - 1] - offsets[offsetIndex];
|
siglen = offsets[offsetIndex - 1] - offsets[offsetIndex];
|
||||||
sig = reinterpret_cast<const char*>(&niceBlock[offsets[offsetIndex]]);
|
sig = reinterpret_cast<const char*>(&niceBlock[offsets[offsetIndex]]);
|
||||||
argsOffset = sizeof(TokenByScanRequestHeader);
|
argsOffset = sizeof(TokenByScanRequestHeader);
|
||||||
argIndex = 0;
|
|
||||||
args = reinterpret_cast<const DataValue*>(&niceInput[argsOffset]);
|
args = reinterpret_cast<const DataValue*>(&niceInput[argsOffset]);
|
||||||
|
|
||||||
if (eqFilter)
|
if (eqFilter)
|
||||||
@ -161,7 +160,6 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader* h, TokenB
|
|||||||
goto store;
|
goto store;
|
||||||
|
|
||||||
argsOffset += sizeof(uint16_t) + args->len;
|
argsOffset += sizeof(uint16_t) + args->len;
|
||||||
argIndex++;
|
|
||||||
args = (DataValue*)&niceInput[argsOffset];
|
args = (DataValue*)&niceInput[argsOffset];
|
||||||
|
|
||||||
cmpResult = compare(cs, h->COP2, sig, siglen, args->data, args->len);
|
cmpResult = compare(cs, h->COP2, sig, siglen, args->data, args->len);
|
||||||
@ -186,7 +184,6 @@ void PrimitiveProcessor::p_TokenByScan(const TokenByScanRequestHeader* h, TokenB
|
|||||||
goto store;
|
goto store;
|
||||||
|
|
||||||
argsOffset += sizeof(uint16_t) + args->len;
|
argsOffset += sizeof(uint16_t) + args->len;
|
||||||
argIndex++;
|
|
||||||
args = (DataValue*)&niceInput[argsOffset];
|
args = (DataValue*)&niceInput[argsOffset];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,11 +344,9 @@ void metadataJournalTest(std::size_t size, off_t offset)
|
|||||||
cmd->flen = std::strlen(filename);
|
cmd->flen = std::strlen(filename);
|
||||||
memcpy(&cmd->filename, filename, cmd->flen);
|
memcpy(&cmd->filename, filename, cmd->flen);
|
||||||
data = (uint64_t*)&cmd->filename[cmd->flen];
|
data = (uint64_t*)&cmd->filename[cmd->flen];
|
||||||
int count = 0;
|
|
||||||
for (uint64_t i = 0; i < (size / sizeof(uint64_t)); i++)
|
for (uint64_t i = 0; i < (size / sizeof(uint64_t)); i++)
|
||||||
{
|
{
|
||||||
data[i] = i;
|
data[i] = i;
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
hdr->type = SM_MSG_START;
|
hdr->type = SM_MSG_START;
|
||||||
hdr->payloadLen = sizeof(*cmd) + cmd->flen + cmd->count;
|
hdr->payloadLen = sizeof(*cmd) + cmd->flen + cmd->count;
|
||||||
@ -384,11 +382,9 @@ void metadataJournalTest_append(std::size_t size)
|
|||||||
cmd->flen = std::strlen(filename);
|
cmd->flen = std::strlen(filename);
|
||||||
memcpy(&cmd->filename, filename, cmd->flen);
|
memcpy(&cmd->filename, filename, cmd->flen);
|
||||||
data = (uint64_t*)&cmd->filename[cmd->flen];
|
data = (uint64_t*)&cmd->filename[cmd->flen];
|
||||||
int count = 0;
|
|
||||||
for (uint64_t i = 0; i < (size / sizeof(uint64_t)); i++)
|
for (uint64_t i = 0; i < (size / sizeof(uint64_t)); i++)
|
||||||
{
|
{
|
||||||
data[i] = i;
|
data[i] = i;
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
hdr->type = SM_MSG_START;
|
hdr->type = SM_MSG_START;
|
||||||
hdr->payloadLen = sizeof(*cmd) + cmd->flen + cmd->count;
|
hdr->payloadLen = sizeof(*cmd) + cmd->flen + cmd->count;
|
||||||
|
@ -193,13 +193,7 @@ static Counts& counts()
|
|||||||
#define ROBIN_HOOD_PRIVATE_DEFINITION_HAS_NATIVE_WCHART() 1
|
#define ROBIN_HOOD_PRIVATE_DEFINITION_HAS_NATIVE_WCHART() 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// workaround missing "is_trivially_copyable" in g++ < 5.0
|
|
||||||
// See https://stackoverflow.com/a/31798726/48181
|
|
||||||
#if defined(__GNUC__) && __GNUC__ < 5
|
|
||||||
#define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) __has_trivial_copy(__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
#define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable<__VA_ARGS__>::value
|
#define ROBIN_HOOD_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable<__VA_ARGS__>::value
|
||||||
#endif
|
|
||||||
|
|
||||||
// helpers for C++ versions, see https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
|
// helpers for C++ versions, see https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
|
||||||
#define ROBIN_HOOD_PRIVATE_DEFINITION_CXX() __cplusplus
|
#define ROBIN_HOOD_PRIVATE_DEFINITION_CXX() __cplusplus
|
||||||
|
@ -1131,7 +1131,7 @@ bool mysql_str_to_time(const string& input, Time& output, long decimals)
|
|||||||
output.minute = 59;
|
output.minute = 59;
|
||||||
output.second = 59;
|
output.second = 59;
|
||||||
output.msecond = exp10(decimals) - 1;
|
output.msecond = exp10(decimals) - 1;
|
||||||
output.is_neg = 1;
|
output.is_neg = -1;
|
||||||
}
|
}
|
||||||
// If neither of the above match then we return a 0 time
|
// If neither of the above match then we return a 0 time
|
||||||
else
|
else
|
||||||
|
@ -971,7 +971,7 @@ struct Time
|
|||||||
signed is_neg : 1;
|
signed is_neg : 1;
|
||||||
|
|
||||||
// NULL column value = 0xFFFFFFFFFFFFFFFE
|
// NULL column value = 0xFFFFFFFFFFFFFFFE
|
||||||
Time() : msecond(-2), second(-1), minute(-1), hour(-1), day(-1), is_neg(0b1)
|
Time() : msecond(-2), second(-1), minute(-1), hour(-1), day(-1), is_neg(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -990,7 +990,7 @@ struct Time
|
|||||||
: msecond(msec), second(sec), minute(min), hour(h), day(d), is_neg(neg)
|
: msecond(msec), second(sec), minute(min), hour(h), day(d), is_neg(neg)
|
||||||
{
|
{
|
||||||
if (h < 0)
|
if (h < 0)
|
||||||
is_neg = 0b1;
|
is_neg = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t convertToMySQLint() const;
|
int64_t convertToMySQLint() const;
|
||||||
@ -1003,7 +1003,7 @@ inline void Time::reset()
|
|||||||
second = -1;
|
second = -1;
|
||||||
minute = -1;
|
minute = -1;
|
||||||
hour = -1;
|
hour = -1;
|
||||||
is_neg = 0b1;
|
is_neg = -1;
|
||||||
day = -1;
|
day = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user