{} fixes from Erik Bertelsen <erik@erik-be.uni-c.dk> (PR 6047) to shut up egcs.

This commit is contained in:
ross 1998-08-27 20:31:00 +00:00
parent 206d54f97f
commit b1934d6034
14 changed files with 55 additions and 39 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dumpfs.c,v 1.17 1998/07/27 00:52:01 mycroft Exp $ */
/* $NetBSD: dumpfs.c,v 1.18 1998/08/27 20:31:00 ross Exp $ */
/*
* Copyright (c) 1983, 1992, 1993
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1992, 1993\n\
#if 0
static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95";
#else
__RCSID("$NetBSD: dumpfs.c,v 1.17 1998/07/27 00:52:01 mycroft Exp $");
__RCSID("$NetBSD: dumpfs.c,v 1.18 1998/08/27 20:31:00 ross Exp $");
#endif
#endif /* not lint */
@ -127,7 +127,7 @@ dumpfs(name)
if (read(fd, &afs, SBSIZE) != SBSIZE)
goto err;
if (afs.fs_magic != FS_MAGIC)
if (afs.fs_magic != FS_MAGIC) {
if (afs.fs_magic == bswap32(FS_MAGIC)) {
ffs_sb_swap(&afs, &afs, 0);
needswap = 1;
@ -136,6 +136,7 @@ dumpfs(name)
(void)close(fd);
return (1);
}
}
#if BYTE_ORDER == LITTLE_ENDIAN
if (needswap)
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: gsp_sym.c,v 1.4 1998/08/27 18:03:43 ross Exp $ */
/* $NetBSD: gsp_sym.c,v 1.5 1998/08/27 20:31:01 ross Exp $ */
/*
* GSP assembler - symbol table
*
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: gsp_sym.c,v 1.4 1998/08/27 18:03:43 ross Exp $");
__RCSID("$NetBSD: gsp_sym.c,v 1.5 1998/08/27 20:31:01 ross Exp $");
#endif
#include <stdio.h>
@ -187,8 +187,8 @@ reset_numeric_labels()
struct numlab *nl;
int h;
for( h = 0; h < NHASH; ++h )
for( p = symbol_hash[h]; p != NULL; p = p->next )
for( h = 0; h < NHASH; ++h ) {
for( p = symbol_hash[h]; p != NULL; p = p->next ) {
if( (p->flags & NUMERIC_LABEL) != 0 ) {
if( (p->flags & DEFINED) != 0 ) {
/* a backward reference */
@ -201,4 +201,6 @@ reset_numeric_labels()
p->lineno = nl->lineno;
}
}
}
}
}

View File

@ -1,11 +1,11 @@
/* $NetBSD: plist.c,v 1.8 1998/06/05 11:22:20 frueauf Exp $ */
/* $NetBSD: plist.c,v 1.9 1998/08/27 20:31:01 ross Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
#else
__RCSID("$NetBSD: plist.c,v 1.8 1998/06/05 11:22:20 frueauf Exp $");
__RCSID("$NetBSD: plist.c,v 1.9 1998/08/27 20:31:01 ross Exp $");
#endif
#endif
@ -507,11 +507,12 @@ delete_hierarchy(char *dir, Boolean ign_err, Boolean nukedirs)
*cp2 = '\0';
if (!isemptydir(dir))
return 0;
if (RMDIR(dir) && !ign_err)
if (RMDIR(dir) && !ign_err) {
if (!fexists(dir))
warnx("directory `%s' doesn't really exist", dir);
else
return 1;
}
/* back up the pathname one component */
if (cp2) {
cp1 = dir;

View File

@ -1,4 +1,4 @@
/* $NetBSD: quotacheck.c,v 1.18 1998/07/27 00:52:02 mycroft Exp $ */
/* $NetBSD: quotacheck.c,v 1.19 1998/08/27 20:31:01 ross Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)quotacheck.c 8.6 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: quotacheck.c,v 1.18 1998/07/27 00:52:02 mycroft Exp $");
__RCSID("$NetBSD: quotacheck.c,v 1.19 1998/08/27 20:31:01 ross Exp $");
#endif
#endif /* not lint */
@ -293,13 +293,14 @@ chkquota(type, fsname, mntpt, v, pid)
sync();
dev_bsize = 1;
bread(SBOFF, (char *)&sblock, (long)SBSIZE);
if (sblock.fs_magic != FS_MAGIC)
if (sblock.fs_magic != FS_MAGIC) {
if (sblock.fs_magic== bswap32(FS_MAGIC)) {
needswap = 1;
ffs_sb_swap(&sblock, &sblock, 0);
} else
errx(1, "%s: superblock magic number 0x%x, not 0x%x",
fsname, sblock.fs_magic, FS_MAGIC);
}
dev_bsize = sblock.fs_fsize / fsbtodb(&sblock, 1);
maxino = sblock.fs_ncg * sblock.fs_ipg;
resetinodebuf();

View File

@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: pdb.c,v 1.5 1997/10/19 09:56:19 mrg Exp $");
__RCSID("$NetBSD: pdb.c,v 1.6 1998/08/27 20:31:01 ross Exp $");
#endif
#include <sys/types.h>
@ -401,11 +401,12 @@ print_ci(cip, totalcip)
}
}
if (tflag)
if (tflag) {
if (!uflow)
printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
else
printf("%8s ", "*ignore*");
}
if (Dflag)
printf("%10qutio ", (unsigned long long)cip->ci_io);

View File

@ -1,4 +1,4 @@
/* $NetBSD: expand.c,v 1.9 1997/10/19 19:53:54 mycroft Exp $ */
/* $NetBSD: expand.c,v 1.10 1998/08/27 20:31:01 ross Exp $ */
/*
* Copyright (c) 1991 Carnegie Mellon University
@ -336,11 +336,12 @@ slash:
if (addpath(*s++)) goto pathovfl;
if (addpath('/')) goto pathovfl;
if (stat(fixit(path), &stb) >= 0 &&
(stb.st_mode&S_IFMT) == S_IFDIR)
(stb.st_mode&S_IFMT) == S_IFDIR) {
if (*p == 0)
addone(path, "");
else
glob(p);
}
pathovfl:
pathp = spathp;
*pathp = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: supcmeat.c,v 1.15 1997/10/19 19:54:02 mycroft Exp $ */
/* $NetBSD: supcmeat.c,v 1.16 1998/08/27 20:31:02 ross Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@ -564,7 +564,7 @@ void *dummy;
changed on the server but the timestamp is right, we do an
update. (Update refers to updating stat information, i.e.
timestamp, owner, mode bits, etc.) */
if (exists && (sbuf.st_mode&S_IFMT) == (t->Tmode&S_IFMT))
if (exists && (sbuf.st_mode&S_IFMT) == (t->Tmode&S_IFMT)) {
if (!S_ISREG(t->Tmode))
if (t->Tflags&FNEW)
fetch = FALSE;
@ -572,10 +572,12 @@ void *dummy;
else if ((thisC->Cflags&CFKEEP) &&
sbuf.st_mtime > t->Tmtime)
return (SCMOK);
else if (sbuf.st_mtime == t->Tmtime)
else if (sbuf.st_mtime == t->Tmtime) {
if (t->Tflags&FNEW)
fetch = FALSE;
else return (SCMOK);
}
}
}
/* If we get this far, we're either doing an update or a full fetch. */
newt = Tinsert (&needT,t->Tname,TRUE);
@ -1475,11 +1477,12 @@ va_dcl
goawayreason = NULL;
va_end(ap);
(void) msggoaway ();
if (fmt)
if (fmt) {
if (thisC)
notify ("SUP: %s\n",buf);
else
printf ("SUP: %s\n",buf);
}
if (!dontjump)
longjmp (sjbuf,TRUE);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: supmsg.c,v 1.5 1997/06/17 18:57:00 christos Exp $ */
/* $NetBSD: supmsg.c,v 1.6 1998/08/27 20:31:02 ross Exp $ */
/*
* Copyright (c) 1992 Carnegie Mellon University
@ -156,11 +156,12 @@ int msgsetup ()
if (x == SCMOK) x = readint (&baseino);
if (x == SCMOK) x = readint (&listonly);
if (x == SCMOK) x = readint (&newonly);
if (x == SCMOK)
if (x == SCMOK) {
if (protver < 6)
release = (char *)NULL;
else
x = readstring (&release);
}
if (x == SCMOK) x = readmend ();
} else {
x = writemsg (MSGSETUP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: traceroute.c,v 1.24 1998/07/17 23:45:24 is Exp $ */
/* $NetBSD: traceroute.c,v 1.25 1998/08/27 20:31:02 ross Exp $ */
/*
* Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@ -29,7 +29,7 @@ static const char rcsid[] =
#else
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n");
__RCSID("$NetBSD: traceroute.c,v 1.24 1998/07/17 23:45:24 is Exp $");
__RCSID("$NetBSD: traceroute.c,v 1.25 1998/08/27 20:31:02 ross Exp $");
#endif
#endif
@ -1061,7 +1061,7 @@ again:
packlen, 0, &whereto, sizeof(whereto));
#endif
if (cc < 0 || cc != packlen) {
if (cc < 0)
if (cc < 0) {
/*
* An errno of EMSGSIZE means we're writing too big a
* datagram for the interface. We have to just decrease
@ -1081,6 +1081,7 @@ again:
} else
Fprintf(stderr, "%s: sendto: %s\n",
prog, strerror(errno));
}
Printf("%s: wrote %s %d chars, ret=%d\n",
prog, hostname, packlen, cc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntp_control.c,v 1.5 1998/08/12 14:11:53 christos Exp $ */
/* $NetBSD: ntp_control.c,v 1.6 1998/08/27 20:31:02 ross Exp $ */
/*
* ntp_control.c - respond to control messages and send async traps
@ -1610,13 +1610,14 @@ ctl_putclock(varid, clock, mustput)
clock->fudgeval1);
break;
case CC_FUDGEVAL2:
if (mustput || (clock->haveflags & CLK_HAVEVAL2))
if (mustput || (clock->haveflags & CLK_HAVEVAL2)) {
if (clock->fudgeval1 > 1)
ctl_putadr(clock_var[CC_FUDGEVAL2].text,
clock->fudgeval2);
else
ctl_putid(clock_var[CC_FUDGEVAL2].text,
(char *)&clock->fudgeval2);
}
break;
case CC_FLAGS:
if (mustput || (clock->haveflags &

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntp_loopfilter.c,v 1.4 1998/08/12 14:11:53 christos Exp $ */
/* $NetBSD: ntp_loopfilter.c,v 1.5 1998/08/27 20:31:02 ross Exp $ */
/*
* ntp_loopfilter.c - implements the NTP loop filter algorithm
@ -719,14 +719,15 @@ loop_config(item, lfp_value)
msyslog(LOG_ERR,
"sigaction() fails to restore SIGSYS trap: %m");
#endif /* SIGSYS */
if (pll_control)
if (pll_control) {
NLOG(NLOG_SYSEVENT) /* conditional syslog */
msyslog(LOG_NOTICE,
"using kernel phase-lock loop %04x", ntv.status);
else
} else {
NLOG(NLOG_SYSEVENT) /* conditional syslog */
msyslog(LOG_NOTICE,
"using xntpd phase-lock loop");
}
#endif /* KERNEL_PLL */
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntp_refclock.c,v 1.5 1998/08/12 14:11:53 christos Exp $ */
/* $NetBSD: ntp_refclock.c,v 1.6 1998/08/27 20:31:03 ross Exp $ */
/*
* ntp_refclock - processing support for reference clocks
@ -156,12 +156,12 @@ refclock_report(peer, code)
pp->currentstatus = code;
pp->lastevent = code;
if (code == CEVNT_FAULT)
if (code == CEVNT_FAULT) {
NLOG(NLOG_CLOCKEVENT)
msyslog(LOG_ERR,
"clock %s fault '%s' (0x%02x)",
refnumtoa(peer->srcadr.sin_addr.s_addr), ceventstr(code), code);
else {
} else {
NLOG(NLOG_CLOCKEVENT)
msyslog(LOG_INFO,
"clock %s event '%s' (0x%02x)",

View File

@ -1,4 +1,4 @@
/* $NetBSD: refclock_true.c,v 1.4 1998/08/12 14:11:56 christos Exp $ */
/* $NetBSD: refclock_true.c,v 1.5 1998/08/27 20:31:03 ross Exp $ */
/*
* refclock_true - clock driver for the Kinemetrics Truetime receivers
@ -226,7 +226,7 @@ true_debug(struct peer *peer, char *fmt, ...) {
want_debugging = (pp->sloppyclockflag & CLK_FLAG2) != 0;
now_debugging = (up->debug != NULL);
if (want_debugging != now_debugging)
if (want_debugging != now_debugging) {
if (want_debugging) {
char filename[20];
@ -244,6 +244,7 @@ true_debug(struct peer *peer, char *fmt, ...) {
fclose(up->debug);
up->debug = NULL;
}
}
if (up->debug) {
fprintf(up->debug, "true%d: ", up->unit);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ypxfr.c,v 1.6 1997/10/13 03:15:30 lukem Exp $ */
/* $NetBSD: ypxfr.c,v 1.7 1998/08/27 20:31:03 ross Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ypxfr.c,v 1.6 1997/10/13 03:15:30 lukem Exp $");
__RCSID("$NetBSD: ypxfr.c,v 1.7 1998/08/27 20:31:03 ross Exp $");
#endif
#include <sys/types.h>
@ -375,11 +375,12 @@ get_remote_ordernum(client, domain, map, lordernum, rordernum)
status = yp_order_host(client, domain, map, (int *)rordernum);
if (status == 0)
if (status == 0) {
if (*rordernum <= lordernum)
status = YPPUSH_AGE;
else
status = YPPUSH_SUCC;
}
return status;
}