From 31d7abadfee7da27924f7130e470ea701b39bc3e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 24 Jan 2003 01:09:40 +0000 Subject: Perform more C warning fixup on all C source files and headers. --- winsup/testsuite/winsup.api/ltp/fcntl07.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'winsup/testsuite/winsup.api/ltp/fcntl07.c') diff --git a/winsup/testsuite/winsup.api/ltp/fcntl07.c b/winsup/testsuite/winsup.api/ltp/fcntl07.c index c48e475ba..d62eb7967 100644 --- a/winsup/testsuite/winsup.api/ltp/fcntl07.c +++ b/winsup/testsuite/winsup.api/ltp/fcntl07.c @@ -132,11 +132,8 @@ *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ #include -#include #include #include -#include -#include #include #include #include @@ -146,10 +143,10 @@ #include "search_path.h" void setup(); -void cleanup(); +void cleanup(void) __attribute__((noreturn)); void help(); -char *TCID="fcntl07"; /* Test program identifier. */ +const char *TCID="fcntl07"; /* Test program identifier. */ int TST_TOTAL=2; /* Total number of test cases. */ extern int Tst_count; /* Test Case counter for tst_* routines */ @@ -170,10 +167,10 @@ int stat_loc; /* for waitpid() */ int file_fd, pipe_fds[2]; /* file descriptors for a file and a system pipe */ #define DEFAULT_FILE "DefaultFileName" -char *File1 = DEFAULT_FILE; +const char *File1 = DEFAULT_FILE; #define DEFAULT_SUBPROG "test_open" -char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */ +const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */ char subprog_path[_POSIX_PATH_MAX]; /* path to exec "openck" with */ #define STRSIZE 255 @@ -181,13 +178,13 @@ int *testfds[] = { &file_fd, &pipe_fds[1], 0 }; -char *testfdtypes[] = { +const char *testfdtypes[] = { "regular file", "write side of system pipe", }; -int test_open(char *arg); -int do_exec(char *prog, int fd, char *tcd); +int test_open(const char *arg); +int do_exec(const char *prog, int fd, const char *tcd); int main(int ac, char **av) @@ -197,7 +194,7 @@ main(int ac, char **av) int exec_return; /* return from do_exec */ int **tcp; /* testcase pointer (pointer to FD) */ - char **tcd; /* testcase description pointer */ + const char **tcd; /* testcase description pointer */ /*************************************************************** * parse standard options, and exit if there is an error @@ -358,7 +355,7 @@ help() */ int -do_exec(char *prog, int fd, char *tcd) +do_exec(const char *prog, int fd, const char *tcd) { int pid; char pidname[STRSIZE]; @@ -400,7 +397,7 @@ do_exec(char *prog, int fd, char *tcd) * It tests if a file descriptor is open and exits accordingly. */ int -test_open(char *arg) +test_open(const char *arg) { int fd, rc; int status; -- cgit v1.2.3