From: Martin Baute Date: Fri, 11 Mar 2016 06:16:47 +0000 (+0100) Subject: RegTest defines no functions, resulting in 'unused variable' warnings. Fixed. X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=7a94eb4d268ab6780c774a50d59e8dd5e578ac7b RegTest defines no functions, resulting in 'unused variable' warnings. Fixed. --- 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 );