From: solar Date: Fri, 2 Jun 2006 14:45:27 +0000 (+0000) Subject: Fixed warnings in test driver. X-Git-Tag: v0.5~170 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=2ae38c6b53d59bd40c10c377da3e306b7132a512 Fixed warnings in test driver. --- diff --git a/platform/example/functions/_PDCLIB/remove.c b/platform/example/functions/_PDCLIB/remove.c index 609ddbe..184a1f2 100644 --- a/platform/example/functions/_PDCLIB/remove.c +++ b/platform/example/functions/_PDCLIB/remove.c @@ -42,9 +42,7 @@ int _PDCLIB_remove( const char * filename ) int main( void ) { - char filename[ L_tmpnam + 6 ] = "touch "; - tmpnam( filename + 6 ); - /* create file */ + char filename[] = "touch testfile"; system( filename ); /* file is actually readable */ TESTCASE( fopen( filename + 6, "r" ) != NULL ); diff --git a/platform/example/functions/_PDCLIB/rename.c b/platform/example/functions/_PDCLIB/rename.c index ab1a75d..849f872 100644 --- a/platform/example/functions/_PDCLIB/rename.c +++ b/platform/example/functions/_PDCLIB/rename.c @@ -38,10 +38,8 @@ int _PDCLIB_rename( const char * old, const char * new ) int main( void ) { - char filename1[ L_tmpnam + 6 ] = "touch "; - char filename2[ L_tmpnam ]; - tmpnam( filename1 + 6 ); - tmpnam( filename2); + char filename1[] = "touch testfile1"; + char filename2[] = "testfile2"; /* check that neither file exists */ TESTCASE( fopen( filename1 + 6, "r" ) == NULL ); TESTCASE( fopen( filename2, "r" ) == NULL );