From 47fbd9c2bd6c59b46fcf4c93851192cbb9240ebb Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 19:52:55 -0500 Subject: move test variables into function body --- locale.c | 15 +++++++-------- signal.c | 22 +++++++++++----------- stdbool.c | 4 ++-- stddef.c | 8 ++++---- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/locale.c b/locale.c index 9714995..238f1e2 100644 --- a/locale.c +++ b/locale.c @@ -2,17 +2,16 @@ #include #include "test.h" -static int locale_categories[] = { - LC_ALL, - LC_COLLATE, - LC_CTYPE, - LC_MONETARY, - LC_NUMERIC, -}; - void test_locale_h(void) { struct lconv *lc; + int locale_categories[] = { + LC_ALL, + LC_COLLATE, + LC_CTYPE, + LC_MONETARY, + LC_NUMERIC, + }; testing_header("locale.h"); diff --git a/signal.c b/signal.c index 050534a..c109645 100644 --- a/signal.c +++ b/signal.c @@ -1,19 +1,19 @@ #include #include "test.h" -static sig_atomic_t sig_atomic; - -static int signals[] = { - SIGABRT, - SIGFPE, - SIGILL, - SIGINT, - SIGSEGV, - SIGTERM, -}; - void test_signal_h(void) { + sig_atomic_t sig_atomic; + + int signals[] = { + SIGABRT, + SIGFPE, + SIGILL, + SIGINT, + SIGSEGV, + SIGTERM, + }; + testing_header("signal.h"); test_distinct(signals); diff --git a/stdbool.c b/stdbool.c index bb43b55..37a859e 100644 --- a/stdbool.c +++ b/stdbool.c @@ -2,10 +2,10 @@ #include #include "test.h" -static bool b; - void test_stdbool_h(void) { + bool b; + testing_header("stdbool.h"); test_true(true); diff --git a/stddef.c b/stddef.c index 069225e..e031867 100644 --- a/stddef.c +++ b/stddef.c @@ -1,12 +1,12 @@ #include #include "test.h" -static ptrdiff_t ptrdiff; -static size_t size; -static wchar_t wchar; - void test_stddef_h(void) { + ptrdiff_t ptrdiff; + size_t size; + wchar_t wchar; + struct s { char a; char b; -- cgit v1.2.1