]> pd.if.org Git - pdclib/commitdiff
Fixed warnings in test driver.
authorsolar <unknown>
Fri, 2 Jun 2006 14:45:27 +0000 (14:45 +0000)
committersolar <unknown>
Fri, 2 Jun 2006 14:45:27 +0000 (14:45 +0000)
platform/example/functions/_PDCLIB/remove.c
platform/example/functions/_PDCLIB/rename.c

index 609ddbe4b49d70b3a722e29fe6838fb8b73c1cb5..184a1f2dcf181209a0e4f80b1f224d12e8db2ae4 100644 (file)
@@ -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 );
index ab1a75d6a51ebd6edf6d4a91e730b6fff033975e..849f872946476beae89d24f890e20f34f1a4721f 100644 (file)
@@ -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 );