diff options
author | Joel Sherrill <joel@rtems.org> | 2019-03-18 08:47:58 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2019-03-25 16:27:44 -0500 |
commit | 127ee3a55289e8cce04c9ee6d29519d841c72d9b (patch) | |
tree | 161f8ec45cc67c90e165f3f4adab5d0c923be994 /testsuites/psxtests | |
parent | libfs/src/pipe/fifo.c: Fix warning. (diff) | |
download | rtems-127ee3a55289e8cce04c9ee6d29519d841c72d9b.tar.bz2 |
psxhdrs/stdio/v*.c: Fix warnings in varargs tests
Diffstat (limited to '')
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vdprintf.c | 6 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vfprintf.c | 6 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vfscanf.c | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vprintf.c | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vscanf.c | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vsnprintf.c | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vsprintf.c | 5 | ||||
-rw-r--r-- | testsuites/psxtests/psxhdrs/stdio/vsscanf.c | 5 |
8 files changed, 26 insertions, 16 deletions
diff --git a/testsuites/psxtests/psxhdrs/stdio/vdprintf.c b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c index dac50275b1..43dfa1e4b8 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vdprintf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c @@ -37,13 +37,15 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { va_list ap; int result; + va_start(ap, arg1); + result = vdprintf( 2, "%d", ap ); return result; diff --git a/testsuites/psxtests/psxhdrs/stdio/vfprintf.c b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c index 0ad6bcdbdc..3ed24b3570 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vfprintf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c @@ -37,14 +37,16 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { FILE *stream; va_list ap; int result; + va_start(ap, arg1); + stream = fopen( "myfile.dat", "w" ); result = vfprintf( stream, "%d", ap ); diff --git a/testsuites/psxtests/psxhdrs/stdio/vfscanf.c b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c index 055d4629c7..0c39b3456b 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vfscanf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c @@ -37,14 +37,15 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { FILE *stream; va_list ap; int result; + va_start(ap, arg1); stream = fopen( "myfile.dat", "w" ); result = vfscanf( stream, " %d %99s ", ap ); diff --git a/testsuites/psxtests/psxhdrs/stdio/vprintf.c b/testsuites/psxtests/psxhdrs/stdio/vprintf.c index 09b4f8c67e..cd758cd5f5 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vprintf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vprintf.c @@ -37,13 +37,14 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { va_list ap; int result; + va_start(ap, arg1); result = vprintf( " %d %99s ", ap ); return result; diff --git a/testsuites/psxtests/psxhdrs/stdio/vscanf.c b/testsuites/psxtests/psxhdrs/stdio/vscanf.c index 5ec0ddd5ae..a39b43ae53 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vscanf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vscanf.c @@ -37,13 +37,14 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { va_list ap; int result; + va_start(ap, arg1); result = vscanf( " %d %99s ", ap ); return result; diff --git a/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c index da5066cd92..003de41475 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c @@ -37,14 +37,15 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { va_list ap; char string[128]; int result; + va_start(ap, arg1); result = vsnprintf( string, sizeof(string), " %d %99s ", ap ); return result; diff --git a/testsuites/psxtests/psxhdrs/stdio/vsprintf.c b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c index d6a5a0f7bb..a57aea8adf 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vsprintf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c @@ -37,14 +37,15 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { va_list ap; char string[128]; int result; + va_start(ap, arg1); result = vsprintf( string, " %d %99s ", ap ); return result; diff --git a/testsuites/psxtests/psxhdrs/stdio/vsscanf.c b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c index 0bb9d35355..dffcc263fd 100644 --- a/testsuites/psxtests/psxhdrs/stdio/vsscanf.c +++ b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c @@ -37,14 +37,15 @@ #include <stdio.h> #include <stdarg.h> -int test( void ); +int test( int arg1, ... ); -int test( void ) +int test( int arg1, ... ) { char *tokenstring = "15 12 14"; va_list ap; int result; + va_start(ap, arg1); result = vsscanf( tokenstring, " %d %99s ", ap ); return result; |