diff options
author | Christopher Faylor <me@cgf.cx> | 2003-01-23 21:21:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-01-23 21:21:28 +0000 |
commit | 9b978ffe8b67bdccd1e0c5bf3ef3c65d60bc6cd3 (patch) | |
tree | 9c1a9a440a79bae5c23602dd05d16645ef4c9419 /winsup/testsuite/winsup.api/crlf.c | |
parent | d8f0f146b8befe92d951c5e5907d41e23f376679 (diff) | |
download | cygnal-9b978ffe8b67bdccd1e0c5bf3ef3c65d60bc6cd3.tar.gz cygnal-9b978ffe8b67bdccd1e0c5bf3ef3c65d60bc6cd3.tar.bz2 cygnal-9b978ffe8b67bdccd1e0c5bf3ef3c65d60bc6cd3.zip |
* libltp/include/test.h: Fix C warnings.
* winsup.api/checksignal.c: Ditto.
* winsup.api/crlf.c: Ditto.
* winsup.api/devzero.c: Ditto.
* winsup.api/iospeed.c: Ditto.
* winsup.api/mmaptest01.c: Ditto.
* winsup.api/mmaptest02.c: Ditto.
* winsup.api/mmaptest03.c: Ditto.
* winsup.api/mmaptest04.c: Ditto.
* winsup.api/nullgetcwd.c: Ditto.
* winsup.api/sigchld.c: Ditto.
* winsup.api/signal-into-win32-api.c: Ditto.
* winsup.api/systemcall.c: Ditto.
* winsup.api/waitpid.c: Ditto.
* winsup.api/pthread/mainthreadexits.c: Ditto.
* winsup.api/pthread/test.h: Ditto.
* winsup.api/pthread/threadidafterfork.c: Ditto.
* Makefile.in: Remove cygrun.exe from RUNTIME since it is built here now.
Diffstat (limited to 'winsup/testsuite/winsup.api/crlf.c')
-rw-r--r-- | winsup/testsuite/winsup.api/crlf.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/winsup/testsuite/winsup.api/crlf.c b/winsup/testsuite/winsup.api/crlf.c index 5dbc2227b..ccabb8f69 100644 --- a/winsup/testsuite/winsup.api/crlf.c +++ b/winsup/testsuite/winsup.api/crlf.c @@ -1,4 +1,3 @@ - typedef enum { Nop=100000, /* ; do nothing */ New1, /* ; reset and begin new test */ @@ -146,6 +145,7 @@ int commands[] = { #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> +#include <string.h> #ifndef O_BINARY #define O_BINARY 0 @@ -250,7 +250,7 @@ v(char *fmt, ...) } void -vp(char *fmt, ...) +vp(const char *fmt, ...) { va_list ap; if (!verbose) return; @@ -262,7 +262,7 @@ vp(char *fmt, ...) } void -errorq(int use_errno, char *fmt, ...) +errorq(int use_errno, const char *fmt, ...) { va_list ap; fprintf(stderr, "crlf: Error at pc=%d: ", pc); @@ -276,7 +276,7 @@ errorq(int use_errno, char *fmt, ...) } void -error(int use_errno, char *fmt, ...) +error(int use_errno, const char *fmt, ...) { va_list ap; fprintf(stderr, "crlf: Error at pc=%d: ", pc); @@ -291,7 +291,7 @@ error(int use_errno, char *fmt, ...) } void -display_buf(char *which, Buffer *buf, int ofs) +display_buf(const char *which, Buffer *buf, int ofs) { int i; fprintf(stderr, "%s %04x:", which, ofs); @@ -303,13 +303,13 @@ display_buf(char *which, Buffer *buf, int ofs) if (isgraph(b)) fprintf(stderr, " %c ", b); else - fprintf(stderr, " ", b); + fprintf(stderr, " . "/*, b*/); } fprintf(stderr, "\n"); } void -compare_bufs(char *name, Buffer *actual, Buffer *expected) +compare_bufs(const char *name, Buffer *actual, Buffer *expected) { int i, got_one=0; for (i=0; i<actual->count && i<expected->count; i++) @@ -340,12 +340,12 @@ compare_bufs(char *name, Buffer *actual, Buffer *expected) int main(int argc, char **argv) { - char *readmode = "rb"; - char *writemode = "wb"; + const char *readmode = "rb"; + const char *writemode = "wb"; FILE *file = 0; - int i, fd; + int i; struct stat st; - char *str; + const char *str = ""; while (argc > 1 && argv[1][0] == '-') { |