Fixed compiler warnings.

Modified files: bigfile3.c env.c initclk.c layer.c nbconn.c ntioto.c
	op_filnf.c prpoll.c randseed.c
This commit is contained in:
wtchang%redhat.com 2005-04-29 22:46:05 +00:00
parent 68f8896d40
commit 83aaffad86
9 changed files with 22 additions and 6 deletions

View File

@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <windows.h>
#endif

View File

@ -45,6 +45,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
PRIntn debug = 0;
PRIntn verbose = 0;

View File

@ -49,6 +49,7 @@
#include "prinrval.h"
#include "prlog.h"
#include <stdio.h>
#include <stdlib.h>
/* The timeouts, in milliseconds */
#define SHORT_TIMEOUT 1000

View File

@ -46,6 +46,7 @@
#include "prwin16.h"
#include <stdlib.h>
#include <string.h>
/*
** Testing layering of I/O

View File

@ -59,6 +59,7 @@
#include "nspr.h"
#include "plgetopt.h"
#include <stdio.h>
#include <string.h>
#ifdef XP_MAC
#define printf PR_LogPrint

View File

@ -136,10 +136,11 @@ static void AcceptThread(void *arg)
ACCEPT_READ_DATASIZE,
PR_SecondsToInterval(1));
if ( bytesRead == -1 && PR_GetError() == PR_IO_TIMEOUT_ERROR )
if ( bytesRead == -1 && PR_GetError() == PR_IO_TIMEOUT_ERROR ) {
if ( debug ) printf("AcceptRead timed out\n");
else
} else {
if ( debug ) printf("Oops! read: %d, error: %d\n", bytesRead, PR_GetError());
}
while( state != AllDone ) {
PR_Lock( ml );

View File

@ -77,7 +77,7 @@ int main(int argc, char **argv)
PR_STDIO_INIT();
t1 = PR_Open("/usr/tmp/ttools/err03.tmp", PR_TRUNCATE | PR_RDWR, 0666);
if (t1 == NULL)
if (t1 == NULL) {
if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
printf ("error code is %d \n", PR_GetError());
printf ("PASS\n");
@ -88,4 +88,9 @@ int main(int argc, char **argv)
printf ("FAIL\n");
return 1;
}
}
PR_Close(t1);
printf ("opened a file that should not exist\n");
printf ("FAIL\n");
return 1;
}

View File

@ -43,6 +43,10 @@
#include <io.h> /* for close() */
#endif
#ifdef XP_UNIX
#include <unistd.h> /* for close() */
#endif
#include "prinit.h"
#include "prio.h"
#include "prlog.h"

View File

@ -46,11 +46,12 @@
** ... more? ... histogram distribution of random numbers
*/
#include <plgetopt.h>
#include <nspr.h>
#include <prrng.h>
#include "plgetopt.h"
#include "nspr.h"
#include "prrng.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
** Test harness infrastructure