From 93addbbda021db7b96c5c10801cec92a634f7136 Mon Sep 17 00:00:00 2001 From: Jeroen Koekkoek Date: Tue, 13 Aug 2019 00:32:12 +0200 Subject: [PATCH] Fix shadow warnings in CUnit tests Signed-off-by: Jeroen Koekkoek --- cmake/Modules/CUnit/include/CUnit/Test.h | 10 +++++----- cmake/Modules/CUnit/include/CUnit/Theory.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/Modules/CUnit/include/CUnit/Test.h b/cmake/Modules/CUnit/include/CUnit/Test.h index 9c36bcb..4797c35 100644 --- a/cmake/Modules/CUnit/include/CUnit/Test.h +++ b/cmake/Modules/CUnit/include/CUnit/Test.h @@ -48,16 +48,16 @@ typedef struct { void CU_TestProxyName(suite, test)(void); \ \ void CU_TestProxyName(suite, test)(void) { \ - cu_data_t data = CU_Fixture(__VA_ARGS__); \ + cu_data_t cu_data = CU_Fixture(__VA_ARGS__); \ \ - if (data.init != NULL) { \ - data.init(); \ + if (cu_data.init != NULL) { \ + cu_data.init(); \ } \ \ CU_TestName(suite, test)(); \ \ - if (data.fini != NULL) { \ - data.fini(); \ + if (cu_data.fini != NULL) { \ + cu_data.fini(); \ } \ } \ \ diff --git a/cmake/Modules/CUnit/include/CUnit/Theory.h b/cmake/Modules/CUnit/include/CUnit/Theory.h index 946dfb7..6a1b98a 100644 --- a/cmake/Modules/CUnit/include/CUnit/Theory.h +++ b/cmake/Modules/CUnit/include/CUnit/Theory.h @@ -47,19 +47,19 @@ extern "C" { void CU_TestProxyName(suite, test)(void); \ \ void CU_TestProxyName(suite, test)(void) { \ - cu_data_t data = CU_Fixture(__VA_ARGS__); \ + cu_data_t cu_data = CU_Fixture(__VA_ARGS__); \ size_t i, n; \ \ - if (data.init != NULL) { \ - data.init(); \ + if (cu_data.init != NULL) { \ + cu_data.init(); \ } \ \ for (i = 0, n = CU_TheoryDataPointsSize(suite, test); i < n; i++) { \ CU_TestName(suite, test) CU_TheoryDataPointsSlice(suite, test, i) ; \ } \ \ - if (data.fini != NULL) { \ - data.fini(); \ + if (cu_data.fini != NULL) { \ + cu_data.fini(); \ } \ } \ \