Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fixing the compiler warnings for GCC 11 #647

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions nel/include/nel/misc/types_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
# define NL_COMP_GCC
#endif

#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110)
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__GNUG__) && __cplusplus >= 201103L) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110)
# define NL_ISO_CPP0X_AVAILABLE
#endif

Expand Down Expand Up @@ -515,7 +515,12 @@ extern void operator delete[](void *p) throw();
# define CHashMap ::__gnu_cxx::hash_map
# define CHashSet ::__gnu_cxx::hash_set
# define CHashMultiMap ::__gnu_cxx::hash_multimap
# define CUniquePtr ::std::auto_ptr
// From GCC 4.4 onward std:unique_ptr should be available in std library. It's deprectated later on
# if GCC_VERSION > 40400
# define CUniquePtr ::std::unique_ptr
# else
# define CUniquePtr ::std::auto_ptr
# endif
# define CUniquePtrMove

namespace __gnu_cxx {
Expand Down
5 changes: 5 additions & 0 deletions nel/tools/nel_unit_test/nel_unit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

#include <nel/misc/debug.h>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

using namespace std;

#ifdef NL_OS_WINDOWS
Expand Down Expand Up @@ -160,3 +163,5 @@ int main(int argc, char *argv[])
nlwarning("Errors during unit testing");
return noerrors?EXIT_SUCCESS:EXIT_FAILURE;
}

#pragma GCC diagnostic pop
5 changes: 5 additions & 0 deletions nel/tools/nel_unit_test/ut_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include "ut_misc_base64.h"
// Add a line here when adding a new test CLASS

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

struct CUTMisc : public Test::Suite
{
CUTMisc()
Expand All @@ -57,4 +60,6 @@ struct CUTMisc : public Test::Suite
}
};

#pragma GCC diagnostic pop

#endif
5 changes: 5 additions & 0 deletions nel/tools/nel_unit_test/ut_net.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#include "ut_net_module.h"
// Add a line here when adding a new test CLASS

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

struct CUTNet : public Test::Suite
{
CUTNet()
Expand All @@ -35,4 +38,6 @@ struct CUTNet : public Test::Suite
}
};

#pragma GCC diagnostic pop

#endif