]> pd.if.org Git - pdclib/commitdiff
RegTest defines no functions, resulting in 'unused variable' warnings. Fixed.
authorMartin Baute <solar@rootdirectory.de>
Fri, 11 Mar 2016 06:16:47 +0000 (07:16 +0100)
committerMartin Baute <solar@rootdirectory.de>
Fri, 11 Mar 2016 06:16:47 +0000 (07:16 +0100)
functions/stdio/_cbprintf.c
functions/stdio/_vcbprintf.c
functions/string/strlcpy.c

index c0192fe0f331a581549c311517372a517e24c1fc..dedf84e5da558792c303b02c79a1bd0322c0c12e 100644 (file)
@@ -46,8 +46,8 @@ static size_t testcb( void *p, const char *buf, size_t size )
 
 int main( void )
 {
 
 int main( void )
 {
-    char target[100];
 #ifndef REGTEST
 #ifndef REGTEST
+    char target[100];
 #include "printf_testcases.h"
 #endif
     return TEST_RESULTS;
 #include "printf_testcases.h"
 #endif
     return TEST_RESULTS;
index 68adab9f310799fd0951648c1e1074d1ea4f09fc..0c950d5e0dd228b06737a1332710818c800a8e7b 100644 (file)
@@ -113,8 +113,8 @@ static int testprintf( char * s, const char * format, ... )
 
 int main( void )
 {
 
 int main( void )
 {
-    char target[100];
 #ifndef REGTEST
 #ifndef REGTEST
+    char target[100];
 #include "printf_testcases.h"
 #endif
     return TEST_RESULTS;
 #include "printf_testcases.h"
 #endif
     return TEST_RESULTS;
index 73b9165dad1199fa3734073f897ca3583ed8afc7..7a73f8c20e9efadd90fab9f20e3ab1c67be1c6bc 100644 (file)
@@ -41,7 +41,9 @@ size_t _PDCLIB_strlcpy(
 
 int main( void )
 {
 
 int main( void )
 {
+#ifndef REGTEST
     char destbuf[10];
     char destbuf[10];
+#endif
     TESTCASE_NOREG( strlcpy(NULL, "a", 0) == 2 );
     TESTCASE_NOREG( strlcpy(destbuf, "a", 10) == 2 );
     TESTCASE_NOREG( strcmp(destbuf, "a") == 0 );
     TESTCASE_NOREG( strlcpy(NULL, "a", 0) == 2 );
     TESTCASE_NOREG( strlcpy(destbuf, "a", 10) == 2 );
     TESTCASE_NOREG( strcmp(destbuf, "a") == 0 );