From 52b3792e951433ebe00ff8b09771e93b31b586ae Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 13 Sep 2018 10:40:10 -0400 Subject: [PATCH] fix warnings in tests --- tests/base/quadrature_simplex_04.cc | 2 +- tests/parameter_handler/parameter_handler_1_include.cc | 3 ++- tests/parameter_handler/parameter_handler_1_include_fail.cc | 3 ++- tests/parameter_handler/parameter_handler_22_last_line.cc | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/base/quadrature_simplex_04.cc b/tests/base/quadrature_simplex_04.cc index c51873d8f3..4e7dd1a679 100644 --- a/tests/base/quadrature_simplex_04.cc +++ b/tests/base/quadrature_simplex_04.cc @@ -25,7 +25,7 @@ #include "simplex.h" void -test(int n) +test(unsigned int n) { const unsigned int dim = 2; diff --git a/tests/parameter_handler/parameter_handler_1_include.cc b/tests/parameter_handler/parameter_handler_1_include.cc index 4d73d0a7b2..5e183c2ff1 100644 --- a/tests/parameter_handler/parameter_handler_1_include.cc +++ b/tests/parameter_handler/parameter_handler_1_include.cc @@ -43,7 +43,8 @@ main() // go into the source dir to read files there. this // is necessary so that we can include files there - chdir(SOURCE_DIR); + const int chdir_return_code = chdir(SOURCE_DIR); + AssertThrow(chdir_return_code == 0, ExcInternalError()); check("parameter_handler_1_include.prm"); return 0; diff --git a/tests/parameter_handler/parameter_handler_1_include_fail.cc b/tests/parameter_handler/parameter_handler_1_include_fail.cc index d316a04ee7..f860ebd280 100644 --- a/tests/parameter_handler/parameter_handler_1_include_fail.cc +++ b/tests/parameter_handler/parameter_handler_1_include_fail.cc @@ -54,7 +54,8 @@ main() // go into the source dir to read files there. this // is necessary so that we can include files there - chdir(SOURCE_DIR); + const int chdir_return_code = chdir(SOURCE_DIR); + AssertThrow(chdir_return_code == 0, ExcInternalError()); check("parameter_handler_1_include_fail.prm"); return 0; diff --git a/tests/parameter_handler/parameter_handler_22_last_line.cc b/tests/parameter_handler/parameter_handler_22_last_line.cc index dd67299502..2e1ebb99b9 100644 --- a/tests/parameter_handler/parameter_handler_22_last_line.cc +++ b/tests/parameter_handler/parameter_handler_22_last_line.cc @@ -44,7 +44,8 @@ main() // go into the source dir to read files there. this // is necessary so that we can include files there - chdir(SOURCE_DIR); + const int chdir_return_code = chdir(SOURCE_DIR); + AssertThrow(chdir_return_code == 0, ExcInternalError()); check("parameter_handler_22_last_line.prm", ""); check("parameter_handler_22_last_line.prm", "# end-of-parameter-section"); -- 2.39.5