From 7a94eb4d268ab6780c774a50d59e8dd5e578ac7b Mon Sep 17 00:00:00 2001 From: Martin Baute Date: Fri, 11 Mar 2016 07:16:47 +0100 Subject: [PATCH] RegTest defines no functions, resulting in 'unused variable' warnings. Fixed. --- functions/stdio/_cbprintf.c | 2 +- functions/stdio/_vcbprintf.c | 2 +- functions/string/strlcpy.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/stdio/_cbprintf.c b/functions/stdio/_cbprintf.c index c0192fe..dedf84e 100644 --- a/functions/stdio/_cbprintf.c +++ b/functions/stdio/_cbprintf.c @@ -46,8 +46,8 @@ static size_t testcb( void *p, const char *buf, size_t size ) int main( void ) { - char target[100]; #ifndef REGTEST + char target[100]; #include "printf_testcases.h" #endif return TEST_RESULTS; diff --git a/functions/stdio/_vcbprintf.c b/functions/stdio/_vcbprintf.c index 68adab9..0c950d5 100644 --- a/functions/stdio/_vcbprintf.c +++ b/functions/stdio/_vcbprintf.c @@ -113,8 +113,8 @@ static int testprintf( char * s, const char * format, ... ) int main( void ) { - char target[100]; #ifndef REGTEST + char target[100]; #include "printf_testcases.h" #endif return TEST_RESULTS; diff --git a/functions/string/strlcpy.c b/functions/string/strlcpy.c index 73b9165..7a73f8c 100644 --- a/functions/string/strlcpy.c +++ b/functions/string/strlcpy.c @@ -41,7 +41,9 @@ size_t _PDCLIB_strlcpy( int main( void ) { +#ifndef REGTEST char destbuf[10]; +#endif TESTCASE_NOREG( strlcpy(NULL, "a", 0) == 2 ); TESTCASE_NOREG( strlcpy(destbuf, "a", 10) == 2 ); TESTCASE_NOREG( strcmp(destbuf, "a") == 0 ); -- 2.40.0