From c9a710f319771df5644cc8d57d5d18b98bf5f042 Mon Sep 17 00:00:00 2001 From: Steve Byan Date: Thu, 25 Feb 2010 11:36:32 -0800 Subject: [PATCH] src: Fix GCC warning on Windows. This removes a warning under gcc 4.4 on WinXP SP3 and mingw: Variable 'state' might get clobbered by 'longjmp'. Signed-off-by: Andreas Schneider Remove warning under gcc 4.4 on WinXP SP3 and mingw: Variable 'state' might get clobbered by 'longjmp' Signed-off-by: Andreas Schneider --- src/cmockery.c | 2 +- src/google/cmockery.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmockery.c b/src/cmockery.c index ac83182..ad8f9ee 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -1584,7 +1584,7 @@ void print_error(const char* const format, ...) { int _run_test( const char * const function_name, const UnitTestFunction Function, - void ** const state, const UnitTestFunctionType function_type, + void ** const volatile state, const UnitTestFunctionType function_type, const void* const heap_check_point) { const ListNode * const volatile check_point = (const ListNode*) (heap_check_point ? diff --git a/src/google/cmockery.h b/src/google/cmockery.h index 72c1945..0f411e4 100755 --- a/src/google/cmockery.h +++ b/src/google/cmockery.h @@ -482,7 +482,7 @@ void _test_free(void* const ptr, const char* file, const int line); void _fail(const char * const file, const int line); int _run_test( const char * const function_name, const UnitTestFunction Function, - void ** const state, const UnitTestFunctionType function_type, + void ** const volatile state, const UnitTestFunctionType function_type, const void* const heap_check_point); int _run_tests(const UnitTest * const tests, const size_t number_of_tests); -- 2.34.1