Skip to content

Commit

Permalink
Add pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauger committed Sep 5, 2024
1 parent 36cb36f commit add02f4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions source/bxdatatools/testing/test_enriched_base.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ void test2();
void test_reflection();
#endif // DATATOOLS_WITH_REFLECTION == 1

#if defined(__GNUG__)
#pragma GCC diagnostic ignored "-Werror=dangling-reference"
#endif
#if defined(__clang__)
#pragma clang diagnostic ignored "-Werror=dangling-reference"
#endif

int main(int /* argc_ */, char ** /* argv_ */)
{
int error_code = EXIT_SUCCESS;
Expand Down
6 changes: 3 additions & 3 deletions source/bxdatatools/testing/test_handle_operators.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ bool test_handle_deref_operator()
x.reset();
bool gotException{false};
try {
x->size();
}
catch (std::logic_error& e) {
auto sz = x->size();
std::clog << "sz=" << sz << '\n';
} catch (std::logic_error& e) {
//o.k., we've caught the expected error
gotException = true;
}
Expand Down
7 changes: 7 additions & 0 deletions source/bxdatatools/testing/test_reflection_0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
#include <datatools/multi_properties.h>
#include <datatools/things.h>

#if defined(__GNUG__)
#pragma GCC diagnostic ignored "-Werror=dangling-reference"
#endif
#if defined(__clang__)
#pragma clang diagnostic ignored "-Werror=dangling-reference"
#endif

void test_things(bool /*debug_*/);
void test_multi_properties(bool /*debug_*/);
void test_properties(bool /*debug_*/);
Expand Down
7 changes: 7 additions & 0 deletions source/bxgenbb_help/programs/genbb_inspector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
#include <genbb_help/version.h>
#include <genbb_help/resource.h>

#if defined(__GNUG__)
#pragma GCC diagnostic ignored "-Werror=dangling-reference"
#endif
#if defined(__clang__)
#pragma clang diagnostic ignored "-Werror=dangling-reference"
#endif

namespace dtc = datatools::configuration;

namespace genbb {
Expand Down

0 comments on commit add02f4

Please sign in to comment.