Perform more C warning fixup on all C source files and headers.

This commit is contained in:
Christopher Faylor
2003-01-24 01:09:40 +00:00
parent 1905b7393c
commit 31d7abadfe
203 changed files with 514 additions and 612 deletions

View File

@@ -134,8 +134,6 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <limits.h>
@@ -145,10 +143,10 @@
#include "search_path.h"
void setup();
void cleanup();
void cleanup(void) __attribute__((noreturn));
void help();
char *TCID="fcntl07B"; /* Test program identifier. */
const char *TCID="fcntl07B"; /* Test program identifier. */
int TST_TOTAL=1; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
@@ -168,11 +166,11 @@ int stat_loc; /* for waitpid() */
int npipe_fd;
/* file descriptors for a named 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 */
char subprog_path[_POSIX_PATH_MAX]; /* path to exec "openck" with */
const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
const char subprog_path[_POSIX_PATH_MAX];/* path to exec "openck" with */
#define STRSIZE 255
#define FIFONAME "FiFo"
@@ -180,12 +178,12 @@ int *testfds[] = {
&npipe_fd, 0
};
char *testfdtypes[] = {
const char *testfdtypes[] = {
"named pipe"
};
int test_open(char *arg);
int do_exec(char *prog, int fd, char *tcd);
int do_exec(const char *prog, int fd, const char *tcd);
int
main(int ac, char **av)
@@ -195,7 +193,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
@@ -356,7 +354,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];
@@ -403,9 +401,6 @@ test_open(char *arg)
int fd, rc;
int status;
extern char *optarg;
extern int optind;
fd = atoi(arg);
rc = fcntl(fd, F_GETFD, &status);