Skip to content

Commit

Permalink
Fix: Silence gcc warnings in the unit tests on deprecated use of auto…
Browse files Browse the repository at this point in the history
…_ptr. The cpptest library seems stuck in old code and there is no easy way to change this other than replacing cpptest with something not using deprecated code
  • Loading branch information
planetmaker committed Sep 20, 2021
1 parent 085de1b commit 04d628e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
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

0 comments on commit 04d628e

Please sign in to comment.