1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-27 21:01:50 +03:00

Fix some GCC-12 Build errors

This commit is contained in:
Leonid Fedorov
2022-08-29 17:43:41 +00:00
committed by Leonid Fedorov
parent 678bd6c91e
commit b936ed8b2e
11 changed files with 12 additions and 55 deletions

View File

@ -229,7 +229,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-register")
endif()
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-copy" DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations" DEBUG RELEASE RELWITHDEBINFO MINSIZEREL)
MY_CHECK_AND_SET_COMPILER_FLAG("-Werror -Wall")
SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed")

View File

@ -42,7 +42,7 @@ using namespace querytele;
namespace
{
template <class T>
struct deleter : public unary_function<T&, void>
struct deleter
{
void operator()(T& x)
{

View File

@ -197,7 +197,7 @@ class ConstantColumn : public ReturnedColumn
/** Constant column on the filte can always be moved into derived table */
virtual void setDerivedTable()
{
fDerivedTable = "*";
fDerivedTable = std::string("*");
}
private:

View File

@ -40,7 +40,7 @@ using namespace std;
namespace
{
template <class T>
struct deleter : public unary_function<T&, void>
struct deleter
{
void operator()(T& x)
{

View File

@ -159,7 +159,7 @@ struct EngineCommRunner
};
template <typename T>
struct QueueShutdown : public unary_function<T&, void>
struct QueueShutdown
{
void operator()(T& x)
{

View File

@ -980,7 +980,7 @@ const JobStepVector doAggProject(const CalpontSelectExecutionPlan* csep, JobInfo
// doesn't really make sense.
if (op != AggregateColumn::SUM && op != AggregateColumn::DISTINCT_SUM &&
op != AggregateColumn::AVG && op != AggregateColumn::DISTINCT_AVG &&
op != AggregateColumn::BIT_AND && op != AggregateColumn::BIT_OR &&
op != AggregateColumn::BIT_AND && op != AggregateColumn::BIT_OR &&
op != AggregateColumn::BIT_XOR)
{
updateAggregateColType(aggc, srcp, op, jobInfo);
@ -1323,11 +1323,11 @@ const JobStepVector doAggProject(const CalpontSelectExecutionPlan* csep, JobInfo
}
template <typename T>
class Uniqer : public unary_function<typename T::value_type, void>
class Uniqer
{
private:
typedef typename T::mapped_type Mt_;
class Pred : public unary_function<const Mt_, bool>
class Pred
{
public:
Pred(const Mt_& retCol) : fRetCol(retCol)

View File

@ -41,29 +41,6 @@
#include <boost/thread.hpp>
#include <boost/scoped_array.hpp>
#ifndef _HASHFIX_
#define _HASHFIX_
#ifndef __LP64__
// This is needed for /usr/include/c++/4.1.1/tr1/functional on 32-bit compiles
// tr1_hashtable_define_trivial_hash(long long unsigned int);
#include "jl_logger.h"
namespace std
{
namespace tr1
{
template <>
struct hash<long long unsigned int> : public std::unary_function<long long unsigned int, std::size_t>
{
std::size_t operator()(long long unsigned int val) const
{
return static_cast<std::size_t>(val);
}
};
} // namespace tr1
} // namespace std
#endif
#endif
#include <sys/time.h>
#include <cassert>
#include <boost/scoped_array.hpp>

View File

@ -37,28 +37,6 @@
#include <tr1/unordered_map>
#ifndef _UNORDERED_MAP_FIX_
#define _UNORDERED_MAP_FIX_
#ifndef __LP64__
#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
// This is needed for /usr/include/c++/4.1.1/tr1/functional on 32-bit compiles
// tr1_hashtable_define_trivial_hash(long long int);
namespace std
{
namespace tr1
{
template <>
struct hash<long long int> : public std::unary_function<long long int, std::size_t>
{
std::size_t operator()(long long int val) const
{
return static_cast<std::size_t>(val);
}
};
} // namespace tr1
} // namespace std
#endif // if __GNUC__
#endif // if !__LP64__
#endif //_UNORDERED_MAP_FIX_
#else
#include <unordered_map>

View File

@ -124,7 +124,7 @@ class ColExtInfEntry
* the last input Row number in the extent, as the key.
*/
//------------------------------------------------------------------------------
struct uint64Hasher : public std::unary_function<RID, std::size_t>
struct uint64Hasher
{
std::size_t operator()(RID val) const
{

View File

@ -101,7 +101,7 @@ class AllocExtEntry
* the corresponding column OID as the key.
*/
//------------------------------------------------------------------------------
struct AllocExtHasher : public std::unary_function<OID, std::size_t>
struct AllocExtHasher
{
std::size_t operator()(OID val) const
{

View File

@ -149,7 +149,7 @@ struct WEClientRunner
};
template <typename T>
struct QueueShutdown : public unary_function<T&, void>
struct QueueShutdown
{
void operator()(T& x)
{