diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/debug.cc | 6 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/fork.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/net.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 10 |
9 files changed, 22 insertions, 19 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 80c4b0d..71a7a5c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +Tue Feb 22 23:06:01 2000 Christopher Faylor <cgf@cygnus.com> + + Respond to more g++ warnings relating to initializing structures. + Mon Feb 21 18:36:37 2000 Christopher Faylor <cgf@cygnus.com> * fhandler.cc (set_inheritance): Revert previous patch which got rid of diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index cbf3179..077ccf0 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -23,7 +23,7 @@ typedef struct const char *name; } thread_info; -static NO_COPY thread_info threads[32] = {{0}}; // increase as necessary +static NO_COPY thread_info threads[32] = {{0, NULL}}; // increase as necessary #define NTHREADS (sizeof(threads) / sizeof(threads[0])) void @@ -173,10 +173,10 @@ typedef struct _h struct _h *next; } handle_list; -static NO_COPY handle_list starth = {0}; +static NO_COPY handle_list starth = {0, NULL, NULL, NULL, 0, NULL}; static NO_COPY handle_list *endh = NULL; -static handle_list NO_COPY freeh[1000] = {{0}}; +static handle_list NO_COPY freeh[1000] = {{0, NULL, NULL, NULL, 0, NULL}}; #define NFREEH (sizeof (freeh) / sizeof (freeh[0])) static muto NO_COPY *debug_lock = NULL; diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 198824c..a1ab267 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -365,9 +365,9 @@ try_to_debug () BOOL dbg; - PROCESS_INFORMATION pi = {0}; + PROCESS_INFORMATION pi = {NULL, 0, 0, 0}; - STARTUPINFO si = {0}; + STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; si.lpReserved = NULL; si.lpDesktop = NULL; si.dwFlags = 0; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index a82d2dc..9f50f08 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -245,7 +245,7 @@ fork () HANDLE subproc_ready, forker_finished; void *stack_here; int x; - PROCESS_INFORMATION pi = {0}; + PROCESS_INFORMATION pi = {0, NULL, 0, 0}; MALLOC_CHECK; @@ -332,7 +332,7 @@ fork () for the forkee. */ strcpy(child->progname, myself->progname); - STARTUPINFO si = {0}; + STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; si.cb = sizeof (STARTUPINFO); si.lpReserved2 = (LPBYTE)&ch; diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 41cbb7e..a42b3d3 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -225,7 +225,7 @@ static struct tl errmap[] = {WSAEREMOTE, "WSAEREMOTE", EREMOTE}, {WSAEINVAL, "WSAEINVAL", EINVAL}, {WSAEFAULT, "WSAEFAULT", EFAULT}, - {0} + {0, NULL, 0} }; /* Cygwin internal */ @@ -256,7 +256,7 @@ static struct tl host_errmap[] = {WSATRY_AGAIN, "WSATRY_AGAIN", TRY_AGAIN}, {WSANO_RECOVERY, "WSANO_RECOVERY", NO_RECOVERY}, {WSANO_DATA, "WSANO_DATA", NO_DATA}, - {0} + {0, NULL, 0} }; /* Cygwin internal */ diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 69f1ec9..b3d3560 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1038,7 +1038,7 @@ static int peek_socket (select_record *me, int) { winsock_fd_set ws_readfds, ws_writefds, ws_exceptfds; - struct timeval tv = {0}; + struct timeval tv = {0, 0}; WINSOCK_FD_ZERO (&ws_readfds); WINSOCK_FD_ZERO (&ws_writefds); WINSOCK_FD_ZERO (&ws_exceptfds); diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index b4bd1ef..f924a4c 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -97,7 +97,7 @@ Static pinfo *zombies[PSIZE] = {NULL}; // All my deceased children info Static int nchildren = 0; // Number of active children Static int nzombies = 0; // Number of deceased children -Static waitq waitq_head = {0}; // Start of queue for wait'ing threads +Static waitq waitq_head = {0, 0, 0, 0, 0, 0, 0};// Start of queue for wait'ing threads Static waitq waitq_main; // Storage for main thread DWORD NO_COPY maintid = 0; // ID of the main thread diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 5100319..59b1e81 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -438,9 +438,8 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, MALLOC_CHECK; skip_arg_parsing: - PROCESS_INFORMATION pi = {0}; - - STARTUPINFO si = {0}; + PROCESS_INFORMATION pi = {NULL, 0, 0, 0}; + STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; si.lpReserved = NULL; si.lpDesktop = NULL; si.dwFlags = STARTF_USESTDHANDLES; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 922206a..e7b98ef 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1627,7 +1627,7 @@ mknod () /* FIXME: unimplemented! */ extern "C" int -setgid (gid_t a) +setgid (gid_t) { set_errno (ENOSYS); return 0; @@ -1637,7 +1637,7 @@ setgid (gid_t a) /* FIXME: unimplemented! */ extern "C" int -setuid (uid_t b) +setuid (uid_t) { set_errno (ENOSYS); return 0; @@ -1646,7 +1646,7 @@ setuid (uid_t b) /* seteuid: standards? */ extern "C" int -seteuid (uid_t c) +seteuid (uid_t) { set_errno (ENOSYS); return 0; @@ -1655,7 +1655,7 @@ seteuid (uid_t c) /* setegid: from System V. */ extern "C" int -setegid (gid_t a) +setegid (gid_t) { set_errno (ENOSYS); return 0; @@ -1664,7 +1664,7 @@ setegid (gid_t a) /* chroot: privileged Unix system call. */ extern "C" int -chroot (const char *path) +chroot (const char *) { set_errno (ENOSYS); return -1; |