Deal with GCC warnings.

This commit is contained in:
mycroft 1998-02-03 07:48:32 +00:00
parent 484f3e93b1
commit 620e5b5b8b
5 changed files with 39 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_ulimit.c,v 1.2 1997/01/12 19:11:42 tls Exp $ */
/* $NetBSD: c_ulimit.c,v 1.3 1998/02/03 07:48:32 mycroft Exp $ */
/*
ulimit -- handle "ulimit" builtin
@ -119,6 +119,11 @@ c_ulimit(wp)
struct rlimit limit;
#endif /* HAVE_SETRLIMIT */
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &val;
#endif
if (!options[0]) {
/* build options string on first call - yuck */
char *p = options;

View File

@ -1,4 +1,4 @@
/* $NetBSD: buf_subs.c,v 1.8 1997/07/25 23:53:54 scottr Exp $ */
/* $NetBSD: buf_subs.c,v 1.9 1998/02/03 07:48:36 mycroft Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94";
#else
__RCSID("$NetBSD: buf_subs.c,v 1.8 1997/07/25 23:53:54 scottr Exp $");
__RCSID("$NetBSD: buf_subs.c,v 1.9 1998/02/03 07:48:36 mycroft Exp $");
#endif
#endif /* not lint */
@ -867,6 +867,11 @@ cp_file(arcn, fd1, fd2)
int sz = MINFBSZ;
struct stat sb;
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &cpcnt;
#endif
/*
* check for holes in the source file. If none, we will use regular
* write instead of file write.

View File

@ -1,4 +1,4 @@
/* $NetBSD: file_subs.c,v 1.8 1997/10/19 13:02:43 mycroft Exp $ */
/* $NetBSD: file_subs.c,v 1.9 1998/02/03 07:48:38 mycroft Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: file_subs.c,v 1.8 1997/10/19 13:02:43 mycroft Exp $");
__RCSID("$NetBSD: file_subs.c,v 1.9 1998/02/03 07:48:38 mycroft Exp $");
#endif
#endif /* not lint */
@ -1020,6 +1020,11 @@ set_crc(arcn, fd)
char tbuf[FILEBLK];
struct stat sb;
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &cpcnt;
#endif
if (fd < 0) {
/*
* hmm, no fd, should never happen. well no crc then.

View File

@ -1,4 +1,4 @@
/* $NetBSD: gen_subs.c,v 1.8 1997/07/30 05:04:23 thorpej Exp $ */
/* $NetBSD: gen_subs.c,v 1.9 1998/02/03 07:48:42 mycroft Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: gen_subs.c,v 1.8 1997/07/30 05:04:23 thorpej Exp $");
__RCSID("$NetBSD: gen_subs.c,v 1.9 1998/02/03 07:48:42 mycroft Exp $");
#endif
#endif /* not lint */
@ -404,6 +404,11 @@ asc_uqd(str, len, base)
char *stop;
u_quad_t tval = 0;
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &tval;
#endif
stop = str + len;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: rcp.c,v 1.19 1997/10/21 13:47:17 christos Exp $ */
/* $NetBSD: rcp.c,v 1.20 1998/02/03 07:48:44 mycroft Exp $ */
/*
* Copyright (c) 1983, 1990, 1992, 1993
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1990, 1992, 1993\n\
#if 0
static char sccsid[] = "@(#)rcp.c 8.2 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: rcp.c,v 1.19 1997/10/21 13:47:17 christos Exp $");
__RCSID("$NetBSD: rcp.c,v 1.20 1998/02/03 07:48:44 mycroft Exp $");
#endif
#endif /* not lint */
@ -396,6 +396,11 @@ source(argc, argv)
int amt, fd, haderr, indx, result;
char *last, *name, buf[BUFSIZ];
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &i;
#endif
for (indx = 0; indx < argc; ++indx) {
name = argv[indx];
if ((fd = open(name, O_RDONLY, 0)) < 0)
@ -549,6 +554,11 @@ sink(argc, argv)
#define mtime tv[1]
#define SCREWUP(str) { why = str; goto screwup; }
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */
(void) &i;
#endif
setimes = targisdir = 0;
mask = umask(0);
if (!pflag)