Browse Source

Eliminate the last of the LINTEDn and PRINTFLIKEn comments. In one

case, by deleting some useless '& of an array' we also eliminate the need
for the casts which prompted the original lint warnings
ok deraadt@
OPENBSD_5_9
guenther 9 years ago
parent
commit
e007f40f71
6 changed files with 7 additions and 15 deletions
  1. +2
    -4
      src/lib/libc/stdlib/getopt_long.c
  2. +1
    -2
      src/lib/libc/string/wcschr.c
  3. +1
    -2
      src/lib/libc/string/wcspbrk.c
  4. +1
    -2
      src/lib/libc/string/wcsrchr.c
  5. +1
    -3
      src/lib/libc/string/wcsstr.c
  6. +1
    -2
      src/lib/libc/string/wmemchr.c

+ 2
- 4
src/lib/libc/stdlib/getopt_long.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: getopt_long.c,v 1.28 2015/09/19 04:02:21 guenther Exp $ */
/* $OpenBSD: getopt_long.c,v 1.29 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
/* /*
@ -149,9 +149,7 @@ permute_args(int panonopt_start, int panonopt_end, int opt_end,
else else
pos += nopts; pos += nopts;
swap = nargv[pos]; swap = nargv[pos];
/* LINTED const cast */
((char **) nargv)[pos] = nargv[cstart];
/* LINTED const cast */
((char **)nargv)[pos] = nargv[cstart];
((char **)nargv)[cstart] = swap; ((char **)nargv)[cstart] = swap;
} }
} }


+ 1
- 2
src/lib/libc/string/wcschr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcschr.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $OpenBSD: wcschr.c,v 1.6 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ /* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*- /*-
@ -39,7 +39,6 @@ wcschr(const wchar_t *s, wchar_t c)
p = s; p = s;
for (;;) { for (;;) {
if (*p == c) { if (*p == c) {
/* LINTED interface specification */
return (wchar_t *)p; return (wchar_t *)p;
} }
if (!*p) if (!*p)


+ 1
- 2
src/lib/libc/string/wcspbrk.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcspbrk.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $OpenBSD: wcspbrk.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*- /*-
@ -42,7 +42,6 @@ wcspbrk(const wchar_t *s, const wchar_t *set)
q = set; q = set;
while (*q) { while (*q) {
if (*p == *q) { if (*p == *q) {
/* LINTED interface specification */
return (wchar_t *)p; return (wchar_t *)p;
} }
q++; q++;


+ 1
- 2
src/lib/libc/string/wcsrchr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsrchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $OpenBSD: wcsrchr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*- /*-
@ -41,7 +41,6 @@ wcsrchr(const wchar_t *s, wchar_t c)
p++; p++;
while (s <= p) { while (s <= p) {
if (*p == c) { if (*p == c) {
/* LINTED interface specification */
return (wchar_t *)p; return (wchar_t *)p;
} }
p--; p--;


+ 1
- 3
src/lib/libc/string/wcsstr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsstr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $OpenBSD: wcsstr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */ /* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */
/*- /*-
@ -43,7 +43,6 @@ wcsstr(const wchar_t *big, const wchar_t *little)
const wchar_t *r; const wchar_t *r;
if (!*little) { if (!*little) {
/* LINTED interface specification */
return (wchar_t *)big; return (wchar_t *)big;
} }
if (wcslen(big) < wcslen(little)) if (wcslen(big) < wcslen(little))
@ -61,7 +60,6 @@ wcsstr(const wchar_t *big, const wchar_t *little)
r++; r++;
} }
if (!*q) { if (!*q) {
/* LINTED interface specification */
return (wchar_t *)p; return (wchar_t *)p;
} }
p++; p++;


+ 1
- 2
src/lib/libc/string/wmemchr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $OpenBSD: wmemchr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */
/* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ /* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*- /*-
@ -38,7 +38,6 @@ wmemchr(const wchar_t *s, wchar_t c, size_t n)
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
if (*s == c) { if (*s == c) {
/* LINTED const castaway */
return (wchar_t *)s; return (wchar_t *)s;
} }
s++; s++;


Loading…
Cancel
Save