diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-06 11:52:53 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-06 23:11:06 +0000 |
commit | 6e03daf77fb68f6ecab845a16e10357f3358fa99 (patch) | |
tree | f7cc3f68f58eecac10a945d0d8c637396d32b550 /epan/exntest.c | |
parent | 119f564e0d08e8d507fe1a08350f8bc9e5d3b0b7 (diff) |
Try to suppress clang warnings in exntest.
Nested TRYs result in:
warning: declaration shadows a local variable
Change-Id: Ifaa7baebde0ea4c18be5a53ab7e7964e84716496
Reviewed-on: https://code.wireshark.org/review/6347
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/exntest.c')
-rw-r--r-- | epan/exntest.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/exntest.c b/epan/exntest.c index ef04c5c77b..746acf82ce 100644 --- a/epan/exntest.c +++ b/epan/exntest.c @@ -23,6 +23,8 @@ #include <config.h> #include "exceptions.h" +#include <wsutil/ws_diag_control.h> + gboolean failed = FALSE; void @@ -96,7 +98,7 @@ run_tests(void) failed = TRUE; } - + DIAG_OFF(shadow) /* check that finally is called on an uncaught exception */ ex_thrown = finally_called = 0; TRY { @@ -112,6 +114,7 @@ run_tests(void) ex_thrown++; } ENDTRY; + DIAG_ON(shadow) if (finally_called != 1) { printf("03: FINALLY called %u times (not 1) on uncaught exception\n", finally_called); @@ -124,6 +127,7 @@ run_tests(void) } + DIAG_OFF(shadow) /* check that finally is called on an rethrown exception */ ex_thrown = finally_called = 0; TRY { @@ -146,6 +150,7 @@ run_tests(void) finally_called ++; } ENDTRY; + DIAG_ON(shadow) if (finally_called != 11) { printf("04: finally_called = %u (not 11) on rethrown exception\n", finally_called); @@ -158,6 +163,7 @@ run_tests(void) } + DIAG_OFF(shadow) /* check that finally is called on an exception thrown from a CATCH block */ ex_thrown = finally_called = 0; TRY { @@ -185,6 +191,7 @@ run_tests(void) finally_called ++; } ENDTRY; + DIAG_ON(shadow) if (finally_called != 11) { printf("05: finally_called = %u (not 11) on exception thrown from CATCH\n", finally_called); |