Convert a couple of "(void)&" constructs to volatile.
Flag various unused parameters in restore and dump so that these will compile with -Wextra. (Note: restore uses some stuff from dump.)
This commit is contained in:
parent
920d4bcbef
commit
746c5b06eb
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dumprmt.c,v 1.31 2005/06/27 01:37:32 christos Exp $ */
|
||||
/* $NetBSD: dumprmt.c,v 1.32 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: dumprmt.c,v 1.31 2005/06/27 01:37:32 christos Exp $");
|
||||
__RCSID("$NetBSD: dumprmt.c,v 1.32 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -99,7 +99,7 @@ rmthost(const char *host)
|
|||
}
|
||||
|
||||
static void
|
||||
rmtconnaborted(int dummy)
|
||||
rmtconnaborted(int dummy __unused)
|
||||
{
|
||||
|
||||
errx(X_ABORT, "Lost connection to remote host.");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs_inode.c,v 1.16 2004/03/27 12:59:18 dsl Exp $ */
|
||||
/* $NetBSD: ffs_inode.c,v 1.17 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993, 1994
|
||||
|
@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1991, 1993, 1994\n\
|
|||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: ffs_inode.c,v 1.16 2004/03/27 12:59:18 dsl Exp $");
|
||||
__RCSID("$NetBSD: ffs_inode.c,v 1.17 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -162,7 +162,7 @@ fs_maxino(void)
|
|||
}
|
||||
|
||||
void
|
||||
fs_mapinodes(ino_t maxino, u_int64_t *tape_size, int *anydirskipped)
|
||||
fs_mapinodes(ino_t maxino __unused, u_int64_t *tape_size, int *anydirskipped)
|
||||
{
|
||||
int i, cg, inosused;
|
||||
struct cg *cgp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: optr.c,v 1.35 2006/06/24 05:28:54 perseant Exp $ */
|
||||
/* $NetBSD: optr.c,v 1.36 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1988, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: optr.c,v 1.35 2006/06/24 05:28:54 perseant Exp $");
|
||||
__RCSID("$NetBSD: optr.c,v 1.36 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -144,7 +144,7 @@ char lastmsg[200];
|
|||
* sleep for 2 minutes in case nobody comes to satisfy dump
|
||||
*/
|
||||
void
|
||||
alarmcatch(int dummy)
|
||||
alarmcatch(int dummy __unused)
|
||||
{
|
||||
|
||||
if (notify == 0) {
|
||||
|
@ -171,7 +171,7 @@ alarmcatch(int dummy)
|
|||
* Here if an inquisitive operator interrupts the dump program
|
||||
*/
|
||||
void
|
||||
interrupt(int signo)
|
||||
interrupt(int signo __unused)
|
||||
{
|
||||
int errno_save;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tape.c,v 1.47 2006/10/26 20:02:30 hannken Exp $ */
|
||||
/* $NetBSD: tape.c,v 1.48 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1991, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: tape.c,v 1.47 2006/10/26 20:02:30 hannken Exp $");
|
||||
__RCSID("$NetBSD: tape.c,v 1.48 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -194,7 +194,7 @@ dumpblock(daddr_t blkno, int size)
|
|||
int nogripe = 0;
|
||||
|
||||
static void
|
||||
tperror(int signo)
|
||||
tperror(int signo __unused)
|
||||
{
|
||||
|
||||
if (pipeout) {
|
||||
|
@ -215,7 +215,7 @@ tperror(int signo)
|
|||
}
|
||||
|
||||
static void
|
||||
sigpipe(int signo)
|
||||
sigpipe(int signo __unused)
|
||||
{
|
||||
|
||||
quit("Broken pipe\n");
|
||||
|
@ -252,7 +252,7 @@ do_stats(void)
|
|||
* (derived from optr.c::timeest())
|
||||
*/
|
||||
void
|
||||
statussig(int notused)
|
||||
statussig(int notused __unused)
|
||||
{
|
||||
time_t tnow, deltat;
|
||||
char msgbuf[128];
|
||||
|
@ -710,7 +710,7 @@ restore_check_point:
|
|||
}
|
||||
|
||||
void
|
||||
dumpabort(int signo)
|
||||
dumpabort(int signo __unused)
|
||||
{
|
||||
|
||||
if (master != 0 && master != getpid())
|
||||
|
@ -743,7 +743,7 @@ Exit(int status)
|
|||
* proceed - handler for SIGUSR2, used to synchronize IO between the slaves.
|
||||
*/
|
||||
static void
|
||||
proceed(int signo)
|
||||
proceed(int signo __unused)
|
||||
{
|
||||
caught++;
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ killall(void)
|
|||
* get the lock back for the next cycle by swapping descriptors.
|
||||
*/
|
||||
static void
|
||||
doslave(int cmd, int slave_number)
|
||||
doslave(int cmd, int slave_number __unused)
|
||||
{
|
||||
int nread, nextslave, size, wrote, eot_count, werror;
|
||||
sigset_t nsigset, osigset;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: interactive.c,v 1.24 2005/08/19 06:44:06 christos Exp $ */
|
||||
/* $NetBSD: interactive.c,v 1.25 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: interactive.c,v 1.24 2005/08/19 06:44:06 christos Exp $");
|
||||
__RCSID("$NetBSD: interactive.c,v 1.25 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -772,7 +772,8 @@ fcmp(const void *f1, const void *f2)
|
|||
* respond to interrupts
|
||||
*/
|
||||
void
|
||||
onintr(int signo)
|
||||
/*ARGSUSED*/
|
||||
onintr(int signo __unused)
|
||||
{
|
||||
if (command == 'i' && runshell)
|
||||
longjmp(reset, 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: restore.c,v 1.19 2005/08/19 02:07:19 christos Exp $ */
|
||||
/* $NetBSD: restore.c,v 1.20 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)restore.c 8.3 (Berkeley) 9/13/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: restore.c,v 1.19 2005/08/19 02:07:19 christos Exp $");
|
||||
__RCSID("$NetBSD: restore.c,v 1.20 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -114,7 +114,7 @@ addfile(const char *name, ino_t ino, int type)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
long
|
||||
deletefile(const char *name, ino_t ino, int type)
|
||||
deletefile(const char *name, ino_t ino, int type __unused)
|
||||
{
|
||||
long descend = hflag ? GOOD : FAIL;
|
||||
struct entry *ep;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tape.c,v 1.57 2006/10/30 01:21:53 christos Exp $ */
|
||||
/* $NetBSD: tape.c,v 1.58 2006/12/18 20:07:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tape.c 8.9 (Berkeley) 5/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: tape.c,v 1.57 2006/10/30 01:21:53 christos Exp $");
|
||||
__RCSID("$NetBSD: tape.c,v 1.58 2006/12/18 20:07:32 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -815,16 +815,14 @@ getfile(void (*fill)(char *buf, long size),
|
|||
void (*skip)(char *buf, long size))
|
||||
{
|
||||
int i;
|
||||
int curblk = 0;
|
||||
quad_t size = spcl.c_size;
|
||||
int volatile curblk;
|
||||
quad_t volatile size;
|
||||
static char clearedbuf[MAXBSIZE];
|
||||
char buf[MAXBSIZE / TP_BSIZE][TP_BSIZE];
|
||||
char junk[TP_BSIZE];
|
||||
|
||||
#ifdef __GNUC__ /* XXX: to shut up gcc warnings */
|
||||
(void)&curblk;
|
||||
(void)&size;
|
||||
#endif
|
||||
curblk = 0;
|
||||
size = spcl.c_size;
|
||||
|
||||
if (spcl.c_type == TS_END)
|
||||
panic("ran off end of tape\n");
|
||||
|
@ -947,7 +945,7 @@ xtrlnkfile(char *buf, long size)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
xtrlnkskip(char *buf, long size)
|
||||
xtrlnkskip(char *buf __unused, long size __unused)
|
||||
{
|
||||
|
||||
fprintf(stderr, "unallocated block in symbolic link %s\n",
|
||||
|
@ -971,7 +969,7 @@ xtrmap(char *buf, long size)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
xtrmapskip(char *buf, long size)
|
||||
xtrmapskip(char *buf __unused, long size)
|
||||
{
|
||||
|
||||
panic("hole in map\n");
|
||||
|
@ -983,7 +981,7 @@ xtrmapskip(char *buf, long size)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
void
|
||||
xtrnull(char *buf, long size)
|
||||
xtrnull(char *buf __unused, long size __unused)
|
||||
{
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue