shut up gcc-lib/alpha-dec-osf4.0d/2.8.1

This commit is contained in:
tg 2008-03-05 16:54:21 +00:00
parent 3321382ad2
commit 94158b2326

View File

@ -3,7 +3,7 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.57 2007/10/25 15:34:30 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.58 2008/03/05 16:54:21 tg Exp $");
Trap sigtraps[NSIG + 1]; Trap sigtraps[NSIG + 1];
static struct sigaction Sigact_ign; static struct sigaction Sigact_ign;
@ -660,8 +660,9 @@ hist_init(Source *s)
/* /*
* check on its validity * check on its validity
*/ */
if (base == MAP_FAILED || *base != HMAGIC1 || base[1] != HMAGIC2) { if (base == (unsigned char *)MAP_FAILED ||
if (base != MAP_FAILED) *base != HMAGIC1 || base[1] != HMAGIC2) {
if (base != (unsigned char *)MAP_FAILED)
munmap((caddr_t)base, hsize); munmap((caddr_t)base, hsize);
hist_finish(); hist_finish();
unlink(hname); unlink(hname);
@ -886,7 +887,7 @@ writehistfile(int lno, char *cmd)
bytes = sizenow - hsize; bytes = sizenow - hsize;
base = mmap(NULL, sizenow, PROT_READ, base = mmap(NULL, sizenow, PROT_READ,
MAP_FILE | MAP_PRIVATE, histfd, 0); MAP_FILE | MAP_PRIVATE, histfd, 0);
if (base == MAP_FAILED) if (base == (unsigned char *)MAP_FAILED)
goto bad; goto bad;
new = base + hsize; new = base + hsize;
if (*new != COMMAND) { if (*new != COMMAND) {