diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-04-29 22:46:05 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-04-29 22:46:05 +0000 |
commit | 7eb8108414cd57f16e8e8467310dfdd9d9755364 (patch) | |
tree | e0ef6bb2ddba25659475f9589b143f8fccb6b377 | |
parent | 32b759a307b99d4928a807605408f0201029e5a7 (diff) | |
download | nspr-hg-7eb8108414cd57f16e8e8467310dfdd9d9755364.tar.gz |
Fixed compiler warnings.
Modified files: bigfile3.c env.c initclk.c layer.c nbconn.c ntioto.c
op_filnf.c prpoll.c randseed.c
-rw-r--r-- | pr/tests/bigfile3.c | 1 | ||||
-rw-r--r-- | pr/tests/env.c | 1 | ||||
-rw-r--r-- | pr/tests/initclk.c | 1 | ||||
-rw-r--r-- | pr/tests/layer.c | 1 | ||||
-rw-r--r-- | pr/tests/nbconn.c | 1 | ||||
-rw-r--r-- | pr/tests/ntioto.c | 5 | ||||
-rw-r--r-- | pr/tests/op_filnf.c | 7 | ||||
-rw-r--r-- | pr/tests/prpoll.c | 4 | ||||
-rw-r--r-- | pr/tests/randseed.c | 7 |
9 files changed, 22 insertions, 6 deletions
diff --git a/pr/tests/bigfile3.c b/pr/tests/bigfile3.c index 6fa25ca6..3cb806ff 100644 --- a/pr/tests/bigfile3.c +++ b/pr/tests/bigfile3.c @@ -39,6 +39,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef _WIN32 #include <windows.h> #endif diff --git a/pr/tests/env.c b/pr/tests/env.c index 7f82fe08..ff2ba937 100644 --- a/pr/tests/env.c +++ b/pr/tests/env.c @@ -45,6 +45,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> PRIntn debug = 0; PRIntn verbose = 0; diff --git a/pr/tests/initclk.c b/pr/tests/initclk.c index ba306d20..6540519e 100644 --- a/pr/tests/initclk.c +++ b/pr/tests/initclk.c @@ -49,6 +49,7 @@ #include "prinrval.h" #include "prlog.h" #include <stdio.h> +#include <stdlib.h> /* The timeouts, in milliseconds */ #define SHORT_TIMEOUT 1000 diff --git a/pr/tests/layer.c b/pr/tests/layer.c index 7eae46a2..cb914ba0 100644 --- a/pr/tests/layer.c +++ b/pr/tests/layer.c @@ -46,6 +46,7 @@ #include "prwin16.h" #include <stdlib.h> +#include <string.h> /* ** Testing layering of I/O diff --git a/pr/tests/nbconn.c b/pr/tests/nbconn.c index d2fe6093..099150a5 100644 --- a/pr/tests/nbconn.c +++ b/pr/tests/nbconn.c @@ -59,6 +59,7 @@ #include "nspr.h" #include "plgetopt.h" #include <stdio.h> +#include <string.h> #ifdef XP_MAC #define printf PR_LogPrint diff --git a/pr/tests/ntioto.c b/pr/tests/ntioto.c index 44e2a608..0dc0072a 100644 --- a/pr/tests/ntioto.c +++ b/pr/tests/ntioto.c @@ -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 ); diff --git a/pr/tests/op_filnf.c b/pr/tests/op_filnf.c index aeb2014d..5f676250 100644 --- a/pr/tests/op_filnf.c +++ b/pr/tests/op_filnf.c @@ -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; } diff --git a/pr/tests/prpoll.c b/pr/tests/prpoll.c index 5e4893f9..9058981b 100644 --- a/pr/tests/prpoll.c +++ b/pr/tests/prpoll.c @@ -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" diff --git a/pr/tests/randseed.c b/pr/tests/randseed.c index df80bb8f..fc1fbaeb 100644 --- a/pr/tests/randseed.c +++ b/pr/tests/randseed.c @@ -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 |