| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: err.c,v 1.60 2021/01/02 17:17:00 rillig Exp $ */ | | 1 | /* $NetBSD: err.c,v 1.61 2021/01/03 15:51:16 rillig Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1994, 1995 Jochen Pohl | | 4 | * Copyright (c) 1994, 1995 Jochen Pohl |
5 | * All Rights Reserved. | | 5 | * All Rights Reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -27,27 +27,27 @@ | | | @@ -27,27 +27,27 @@ |
27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
31 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 31 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | */ | | 32 | */ |
33 | | | 33 | |
34 | #if HAVE_NBTOOL_CONFIG_H | | 34 | #if HAVE_NBTOOL_CONFIG_H |
35 | #include "nbtool_config.h" | | 35 | #include "nbtool_config.h" |
36 | #endif | | 36 | #endif |
37 | | | 37 | |
38 | #include <sys/cdefs.h> | | 38 | #include <sys/cdefs.h> |
39 | #if defined(__RCSID) && !defined(lint) | | 39 | #if defined(__RCSID) && !defined(lint) |
40 | __RCSID("$NetBSD: err.c,v 1.60 2021/01/02 17:17:00 rillig Exp $"); | | 40 | __RCSID("$NetBSD: err.c,v 1.61 2021/01/03 15:51:16 rillig Exp $"); |
41 | #endif | | 41 | #endif |
42 | | | 42 | |
43 | #include <sys/types.h> | | 43 | #include <sys/types.h> |
44 | #include <stdarg.h> | | 44 | #include <stdarg.h> |
45 | #include <stdlib.h> | | 45 | #include <stdlib.h> |
46 | | | 46 | |
47 | #include "lint1.h" | | 47 | #include "lint1.h" |
48 | | | 48 | |
49 | /* number of errors found */ | | 49 | /* number of errors found */ |
50 | int nerr; | | 50 | int nerr; |
51 | | | 51 | |
52 | /* number of syntax errors */ | | 52 | /* number of syntax errors */ |
53 | int sytxerr; | | 53 | int sytxerr; |
| @@ -173,27 +173,27 @@ const char *msgs[] = { | | | @@ -173,27 +173,27 @@ const char *msgs[] = { |
173 | "unacceptable operand of '%s'", /* 111 */ | | 173 | "unacceptable operand of '%s'", /* 111 */ |
174 | "cannot take address of bit-field", /* 112 */ | | 174 | "cannot take address of bit-field", /* 112 */ |
175 | "cannot take address of register %s", /* 113 */ | | 175 | "cannot take address of register %s", /* 113 */ |
176 | "%soperand of '%s' must be lvalue", /* 114 */ | | 176 | "%soperand of '%s' must be lvalue", /* 114 */ |
177 | "%soperand of '%s' must be modifiable lvalue", /* 115 */ | | 177 | "%soperand of '%s' must be modifiable lvalue", /* 115 */ |
178 | "illegal pointer subtraction", /* 116 */ | | 178 | "illegal pointer subtraction", /* 116 */ |
179 | "bitwise operation on signed value possibly nonportable", /* 117 */ | | 179 | "bitwise operation on signed value possibly nonportable", /* 117 */ |
180 | "semantics of '%s' change in ANSI C; use explicit cast", /* 118 */ | | 180 | "semantics of '%s' change in ANSI C; use explicit cast", /* 118 */ |
181 | "conversion of '%s' to '%s' is out of range", /* 119 */ | | 181 | "conversion of '%s' to '%s' is out of range", /* 119 */ |
182 | "bitwise operation on signed value nonportable", /* 120 */ | | 182 | "bitwise operation on signed value nonportable", /* 120 */ |
183 | "negative shift", /* 121 */ | | 183 | "negative shift", /* 121 */ |
184 | "shift greater than size of object", /* 122 */ | | 184 | "shift greater than size of object", /* 122 */ |
185 | "illegal combination of %s (%s) and %s (%s), op %s", /* 123 */ | | 185 | "illegal combination of %s (%s) and %s (%s), op %s", /* 123 */ |
186 | "illegal pointer combination, op %s", /* 124 */ | | 186 | "illegal pointer combination (%s) and (%s), op %s", /* 124 */ |
187 | "ANSI C forbids ordered comparisons of pointers to functions",/* 125 */ | | 187 | "ANSI C forbids ordered comparisons of pointers to functions",/* 125 */ |
188 | "incompatible types in conditional", /* 126 */ | | 188 | "incompatible types in conditional", /* 126 */ |
189 | "'&' before array or function: ignored", /* 127 */ | | 189 | "'&' before array or function: ignored", /* 127 */ |
190 | "operands have incompatible pointer types, op %s (%s != %s)", /* 128 */ | | 190 | "operands have incompatible pointer types, op %s (%s != %s)", /* 128 */ |
191 | "expression has null effect", /* 129 */ | | 191 | "expression has null effect", /* 129 */ |
192 | "enum type mismatch, op %s", /* 130 */ | | 192 | "enum type mismatch, op %s", /* 130 */ |
193 | "conversion to '%s' may sign-extend incorrectly", /* 131 */ | | 193 | "conversion to '%s' may sign-extend incorrectly", /* 131 */ |
194 | "conversion from '%s' to '%s' may lose accuracy", /* 132 */ | | 194 | "conversion from '%s' to '%s' may lose accuracy", /* 132 */ |
195 | "conversion of pointer to '%s' loses bits", /* 133 */ | | 195 | "conversion of pointer to '%s' loses bits", /* 133 */ |
196 | "conversion of pointer to '%s' may lose bits", /* 134 */ | | 196 | "conversion of pointer to '%s' may lose bits", /* 134 */ |
197 | "possible pointer alignment problem", /* 135 */ | | 197 | "possible pointer alignment problem", /* 135 */ |
198 | "cannot do pointer arithmetic on operand of unknown size", /* 136 */ | | 198 | "cannot do pointer arithmetic on operand of unknown size", /* 136 */ |
199 | "use of incomplete enum type, op %s", /* 137 */ | | 199 | "use of incomplete enum type, op %s", /* 137 */ |