More egcs warning fixes:
o use braces to avoid potentially ambiguous else o don't default to type int (and also remove a useless register modifier). o Use parens around assignment values used as truth values. o Remove unused function. Reviewed by: obrien and chuckr
This commit is contained in:
parent
859663719d
commit
dcb0ae4ed8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=46079
@ -48,7 +48,7 @@ static char sccsid[] = "@(#)utf2.c 8.1 (Berkeley) 6/4/93";
|
||||
rune_t _UTF2_sgetrune __P((const char *, size_t, char const **));
|
||||
int _UTF2_sputrune __P((rune_t, char *, size_t, char **));
|
||||
|
||||
static _utf_count[16] = {
|
||||
static int _utf_count[16] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1,
|
||||
0, 0, 0, 0, 2, 2, 3, 0,
|
||||
};
|
||||
|
@ -68,7 +68,9 @@ memset(dst0, c0, length)
|
||||
#endif
|
||||
{
|
||||
register size_t t;
|
||||
#ifndef BZERO
|
||||
register u_int c;
|
||||
#endif
|
||||
register u_char *dst;
|
||||
|
||||
dst = dst0;
|
||||
|
@ -45,6 +45,6 @@ strcat(s, append)
|
||||
char *save = s;
|
||||
|
||||
for (; *s; ++s);
|
||||
while (*s++ = *append++);
|
||||
while ((*s++ = *append++));
|
||||
return(save);
|
||||
}
|
||||
|
@ -45,6 +45,6 @@ strcpy(to, from)
|
||||
{
|
||||
char *save = to;
|
||||
|
||||
for (; *to = *from; ++from, ++to);
|
||||
for (; (*to = *from); ++from, ++to);
|
||||
return(save);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: disk.c,v 1.39 1998/12/19 18:48:33 phk Exp $
|
||||
* $Id: disk.c,v 1.40 1999/01/29 11:39:24 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -50,16 +50,6 @@ Read_Int32(u_int32_t *p)
|
||||
return bp[0] | (bp[1] << 8) | (bp[2] << 16) | (bp[3] << 24);
|
||||
}
|
||||
|
||||
static void
|
||||
Write_Int32(u_int32_t *p, u_int32_t v)
|
||||
{
|
||||
u_int8_t *bp = (u_int8_t *)p;
|
||||
bp[0] = (v >> 0) & 0xff;
|
||||
bp[1] = (v >> 8) & 0xff;
|
||||
bp[2] = (v >> 16) & 0xff;
|
||||
bp[3] = (v >> 24) & 0xff;
|
||||
}
|
||||
|
||||
struct disk *
|
||||
Int_Open_Disk(const char *name, u_long size)
|
||||
{
|
||||
|
@ -123,11 +123,12 @@ char *use_it = _ncurses_copyright;
|
||||
|
||||
stolen = topstolen = 0;
|
||||
for (rsp = rippedoff; rsp->line; rsp++) {
|
||||
if (rsp->hook)
|
||||
if (rsp->hook) {
|
||||
if (rsp->line < 0)
|
||||
rsp->hook(newwin(1,COLS, LINES-1,0), COLS);
|
||||
else
|
||||
rsp->hook(newwin(1,COLS, topstolen++,0), COLS);
|
||||
}
|
||||
--LINES;
|
||||
stolen++;
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ lookup(DOS_FS *fs, u_int clus, const char *name, DOS_DE **dep)
|
||||
for (ent = 0; ent < DEPSEC; ent++) {
|
||||
if (!*dir[ent].de.name)
|
||||
return ENOENT;
|
||||
if (*dir[ent].de.name != 0xe5)
|
||||
if (*dir[ent].de.name != 0xe5) {
|
||||
if ((dir[ent].de.attr & FA_MASK) == FA_XDE) {
|
||||
x = dir[ent].xde.seq;
|
||||
if (x & 0x40 || (x + 1 == xdn &&
|
||||
@ -493,6 +493,7 @@ lookup(DOS_FS *fs, u_int clus, const char *name, DOS_DE **dep)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
xdn = 0;
|
||||
}
|
||||
}
|
||||
@ -572,7 +573,7 @@ fsize(DOS_FS *fs, DOS_DE *de)
|
||||
u_int c;
|
||||
int n;
|
||||
|
||||
if (!(size = cv4(de->size)) && de->attr & FA_DIR)
|
||||
if (!(size = cv4(de->size)) && de->attr & FA_DIR) {
|
||||
if (!(c = cv2(de->clus)))
|
||||
size = fs->dirents * sizeof(DOS_DE);
|
||||
else {
|
||||
@ -580,6 +581,7 @@ fsize(DOS_FS *fs, DOS_DE *de)
|
||||
return n;
|
||||
size = blkbyt(fs, n);
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ char *
|
||||
ether_sprintf(ap)
|
||||
register u_char *ap;
|
||||
{
|
||||
register i;
|
||||
register int i;
|
||||
static char etherbuf[18];
|
||||
register char *cp = etherbuf;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user