Lint is differentially far too picky...
Remove some warnings that only appear on i386 (not on amd64) and that for some reason best known to others are deemed fatal for i386. Making this code 'pass lint' does absolutely nothing for its readability (etc).
This commit is contained in:
parent
7aea3a0d0a
commit
5f1a9bea9e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asprintf.c,v 1.16 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: asprintf.c,v 1.17 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: asprintf.c,v 1.16 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: asprintf.c,v 1.17 2009/10/25 17:09:34 dsl Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
|
@ -70,7 +70,7 @@ asprintf(char **str, char const *fmt, ...)
|
|||
if (ret < 0)
|
||||
goto err;
|
||||
*f._p = '\0';
|
||||
_base = realloc(f._bf._base, ret + 1);
|
||||
_base = realloc(f._bf._base, ret + 1u);
|
||||
if (_base == NULL)
|
||||
goto err;
|
||||
*str = (char *)_base;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fgets.c,v 1.25 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: fgets.c,v 1.26 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fgets.c 8.2 (Berkeley) 12/22/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fgets.c,v 1.25 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: fgets.c,v 1.26 2009/10/25 17:09:34 dsl Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -112,19 +112,19 @@ fgets(buf, n, fp)
|
|||
}
|
||||
len = n;
|
||||
}
|
||||
t = memchr(p, '\n', len);
|
||||
t = memchr(p, '\n', len + 0u);
|
||||
if (t != NULL) {
|
||||
len = (int)(++t - p);
|
||||
fp->_r -= len;
|
||||
fp->_p = t;
|
||||
(void)memcpy(s, p, len);
|
||||
(void)memcpy(s, p, len + 0u);
|
||||
s[len] = 0;
|
||||
FUNLOCKFILE(fp);
|
||||
return (buf);
|
||||
}
|
||||
fp->_r -= len;
|
||||
fp->_p += len;
|
||||
(void)memcpy(s, p, len);
|
||||
(void)memcpy(s, p, len + 0u);
|
||||
s += len;
|
||||
n -= len;
|
||||
} while (n != 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fgetwc.c,v 1.9 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: fgetwc.c,v 1.10 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2001 Citrus Project,
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fgetwc.c,v 1.9 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: fgetwc.c,v 1.10 2009/10/25 17:09:34 dsl Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -63,7 +63,7 @@ restart:
|
|||
return WEOF;
|
||||
}
|
||||
nr = mbrtowc(&wc, (const char *)fp->_p,
|
||||
fp->_r, &wcio->wcio_mbstate_in);
|
||||
fp->_r + 0u, &wcio->wcio_mbstate_in);
|
||||
if (nr == (size_t)-1) {
|
||||
fp->_flags |= __SERR;
|
||||
return WEOF;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fread.c,v 1.18 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: fread.c,v 1.19 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fread.c 8.2 (Berkeley) 12/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fread.c,v 1.18 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: fread.c,v 1.19 2009/10/25 17:09:34 dsl Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -76,7 +76,7 @@ fread(buf, size, count, fp)
|
|||
total = resid;
|
||||
p = buf;
|
||||
while (resid > (size_t)(r = fp->_r)) {
|
||||
(void)memcpy(p, fp->_p, r);
|
||||
(void)memcpy(p, fp->_p, r + 0u);
|
||||
fp->_p += r;
|
||||
/* fp->_r = 0 ... done in __srefill */
|
||||
p += r;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fvwrite.c,v 1.19 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: fvwrite.c,v 1.20 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fvwrite.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fvwrite.c,v 1.19 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: fvwrite.c,v 1.20 2009/10/25 17:09:34 dsl Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -84,7 +84,7 @@ __sfvwrite(fp, uio)
|
|||
}
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define COPY(n) (void)memcpy(fp->_p, p, (n))
|
||||
#define COPY(n) (void)memcpy(fp->_p, p, (n) + 0u)
|
||||
|
||||
iov = uio->uio_iov;
|
||||
p = iov->iov_base;
|
||||
|
@ -135,7 +135,7 @@ __sfvwrite(fp, uio)
|
|||
do {
|
||||
_size = (_size << 1) + 1;
|
||||
} while (_size < blen + len);
|
||||
_base = realloc(fp->_bf._base, _size + 1);
|
||||
_base = realloc(fp->_bf._base, _size + 1u);
|
||||
if (_base == NULL)
|
||||
goto err;
|
||||
fp->_w += _size - fp->_bf._size;
|
||||
|
@ -186,7 +186,7 @@ __sfvwrite(fp, uio)
|
|||
do {
|
||||
GETIOV(nlknown = 0);
|
||||
if (!nlknown) {
|
||||
nl = memchr(p, '\n', len);
|
||||
nl = memchr(p, '\n', len + 0u);
|
||||
nldist = nl ? nl + 1 - p : len + 1;
|
||||
nlknown = 1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getdelim.c,v 1.5 2009/10/24 15:20:15 dsl Exp $ */
|
||||
/* $NetBSD: getdelim.c,v 1.6 2009/10/25 17:09:34 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: getdelim.c,v 1.5 2009/10/24 15:20:15 dsl Exp $");
|
||||
__RCSID("$NetBSD: getdelim.c,v 1.6 2009/10/25 17:09:34 dsl Exp $");
|
||||
|
||||
#include "namespace.h"
|
||||
|
||||
|
@ -83,7 +83,7 @@ __getdelim(char **__restrict buf, size_t *__restrict buflen,
|
|||
}
|
||||
|
||||
/* Scan through looking for the separator */
|
||||
p = memchr(fp->_p, sep, fp->_r);
|
||||
p = memchr(fp->_p, sep, fp->_r + 0u);
|
||||
if (p == NULL)
|
||||
len = fp->_r;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue