X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fstdarg.c;h=61def6837958a0745e501c431f5ed58dcc78e349;hb=d6f1494a4f38a212b29a13ee713885058dcf0fe7;hp=e187c76e8dda8360fb02c9cd7ecf5e61243623e8;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/functions/_PDCLIB/stdarg.c b/functions/_PDCLIB/stdarg.c index e187c76..61def68 100644 --- a/functions/_PDCLIB/stdarg.c +++ b/functions/_PDCLIB/stdarg.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* stdarg This file is part of the Public Domain C Library (PDCLib). @@ -10,7 +8,7 @@ #include #include -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" typedef int (*intfunc_t)( void ); @@ -27,6 +25,11 @@ enum tag_t TAG_FUNCPTR }; +static int dummy( void ) +{ + return INT_MAX; +} + static int test( enum tag_t s, ... ) { enum tag_t tag = s; @@ -80,7 +83,9 @@ static int test( enum tag_t s, ... ) } case TAG_FUNCPTR: { - TESTCASE( (va_arg( ap, intfunc_t ))() == INT_MAX ); + intfunc_t function; + TESTCASE( ( function = va_arg( ap, intfunc_t ) ) == dummy ); + TESTCASE( function() == INT_MAX ); tag = va_arg( ap, enum tag_t ); break; } @@ -93,11 +98,6 @@ static int test( enum tag_t s, ... ) } } -static int dummy( void ) -{ - return INT_MAX; -} - int main( void ) { int x = INT_MAX;