diff options
author | guenther <> | 2015-10-01 02:32:07 +0000 |
---|---|---|
committer | guenther <> | 2015-10-01 02:32:07 +0000 |
commit | 17fadf661d157ba2a756646f71fd03369db612f0 (patch) | |
tree | 6a902f9af0ce8df1ba9e863ca22796acaafb59d0 | |
parent | 7d6f4a12ac5b7dc7f80591c2e74ac77a6f543194 (diff) | |
download | openbsd-17fadf661d157ba2a756646f71fd03369db612f0.tar.gz openbsd-17fadf661d157ba2a756646f71fd03369db612f0.tar.bz2 openbsd-17fadf661d157ba2a756646f71fd03369db612f0.zip |
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@
-rw-r--r-- | src/lib/libc/stdlib/getopt_long.c | 6 | ||||
-rw-r--r-- | src/lib/libc/string/wcschr.c | 3 | ||||
-rw-r--r-- | src/lib/libc/string/wcspbrk.c | 3 | ||||
-rw-r--r-- | src/lib/libc/string/wcsrchr.c | 3 | ||||
-rw-r--r-- | src/lib/libc/string/wcsstr.c | 4 | ||||
-rw-r--r-- | src/lib/libc/string/wmemchr.c | 3 |
6 files changed, 7 insertions, 15 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.c b/src/lib/libc/stdlib/getopt_long.c index fe4565526a..eb799c31f5 100644 --- a/src/lib/libc/stdlib/getopt_long.c +++ b/src/lib/libc/stdlib/getopt_long.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: getopt_long.c,v 1.28 2015/09/19 04:02:21 guenther Exp $ */ | 1 | /* $OpenBSD: getopt_long.c,v 1.29 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ | 2 | /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ |
3 | 3 | ||
4 | /* | 4 | /* |
@@ -149,9 +149,7 @@ permute_args(int panonopt_start, int panonopt_end, int opt_end, | |||
149 | else | 149 | else |
150 | pos += nopts; | 150 | pos += nopts; |
151 | swap = nargv[pos]; | 151 | swap = nargv[pos]; |
152 | /* LINTED const cast */ | 152 | ((char **)nargv)[pos] = nargv[cstart]; |
153 | ((char **) nargv)[pos] = nargv[cstart]; | ||
154 | /* LINTED const cast */ | ||
155 | ((char **)nargv)[cstart] = swap; | 153 | ((char **)nargv)[cstart] = swap; |
156 | } | 154 | } |
157 | } | 155 | } |
diff --git a/src/lib/libc/string/wcschr.c b/src/lib/libc/string/wcschr.c index 231c7605a2..709d4797bb 100644 --- a/src/lib/libc/string/wcschr.c +++ b/src/lib/libc/string/wcschr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wcschr.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */ | 1 | /* $OpenBSD: wcschr.c,v 1.6 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ | 2 | /* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -39,7 +39,6 @@ wcschr(const wchar_t *s, wchar_t c) | |||
39 | p = s; | 39 | p = s; |
40 | for (;;) { | 40 | for (;;) { |
41 | if (*p == c) { | 41 | if (*p == c) { |
42 | /* LINTED interface specification */ | ||
43 | return (wchar_t *)p; | 42 | return (wchar_t *)p; |
44 | } | 43 | } |
45 | if (!*p) | 44 | if (!*p) |
diff --git a/src/lib/libc/string/wcspbrk.c b/src/lib/libc/string/wcspbrk.c index 2178dc4067..f398fd92ab 100644 --- a/src/lib/libc/string/wcspbrk.c +++ b/src/lib/libc/string/wcspbrk.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wcspbrk.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */ | 1 | /* $OpenBSD: wcspbrk.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ | 2 | /* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -42,7 +42,6 @@ wcspbrk(const wchar_t *s, const wchar_t *set) | |||
42 | q = set; | 42 | q = set; |
43 | while (*q) { | 43 | while (*q) { |
44 | if (*p == *q) { | 44 | if (*p == *q) { |
45 | /* LINTED interface specification */ | ||
46 | return (wchar_t *)p; | 45 | return (wchar_t *)p; |
47 | } | 46 | } |
48 | q++; | 47 | q++; |
diff --git a/src/lib/libc/string/wcsrchr.c b/src/lib/libc/string/wcsrchr.c index b69bdac1c9..aa936de508 100644 --- a/src/lib/libc/string/wcsrchr.c +++ b/src/lib/libc/string/wcsrchr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wcsrchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */ | 1 | /* $OpenBSD: wcsrchr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ | 2 | /* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -41,7 +41,6 @@ wcsrchr(const wchar_t *s, wchar_t c) | |||
41 | p++; | 41 | p++; |
42 | while (s <= p) { | 42 | while (s <= p) { |
43 | if (*p == c) { | 43 | if (*p == c) { |
44 | /* LINTED interface specification */ | ||
45 | return (wchar_t *)p; | 44 | return (wchar_t *)p; |
46 | } | 45 | } |
47 | p--; | 46 | p--; |
diff --git a/src/lib/libc/string/wcsstr.c b/src/lib/libc/string/wcsstr.c index 6a08b62551..6a7b0dac4a 100644 --- a/src/lib/libc/string/wcsstr.c +++ b/src/lib/libc/string/wcsstr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wcsstr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */ | 1 | /* $OpenBSD: wcsstr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */ | 2 | /* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -43,7 +43,6 @@ wcsstr(const wchar_t *big, const wchar_t *little) | |||
43 | const wchar_t *r; | 43 | const wchar_t *r; |
44 | 44 | ||
45 | if (!*little) { | 45 | if (!*little) { |
46 | /* LINTED interface specification */ | ||
47 | return (wchar_t *)big; | 46 | return (wchar_t *)big; |
48 | } | 47 | } |
49 | if (wcslen(big) < wcslen(little)) | 48 | if (wcslen(big) < wcslen(little)) |
@@ -61,7 +60,6 @@ wcsstr(const wchar_t *big, const wchar_t *little) | |||
61 | r++; | 60 | r++; |
62 | } | 61 | } |
63 | if (!*q) { | 62 | if (!*q) { |
64 | /* LINTED interface specification */ | ||
65 | return (wchar_t *)p; | 63 | return (wchar_t *)p; |
66 | } | 64 | } |
67 | p++; | 65 | p++; |
diff --git a/src/lib/libc/string/wmemchr.c b/src/lib/libc/string/wmemchr.c index 55fb76a5e6..556a0b35cc 100644 --- a/src/lib/libc/string/wmemchr.c +++ b/src/lib/libc/string/wmemchr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wmemchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */ | 1 | /* $OpenBSD: wmemchr.c,v 1.5 2015/10/01 02:32:07 guenther Exp $ */ |
2 | /* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ | 2 | /* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -38,7 +38,6 @@ wmemchr(const wchar_t *s, wchar_t c, size_t n) | |||
38 | 38 | ||
39 | for (i = 0; i < n; i++) { | 39 | for (i = 0; i < n; i++) { |
40 | if (*s == c) { | 40 | if (*s == c) { |
41 | /* LINTED const castaway */ | ||
42 | return (wchar_t *)s; | 41 | return (wchar_t *)s; |
43 | } | 42 | } |
44 | s++; | 43 | s++; |