| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: err.c,v 1.69 2021/01/17 17:14:34 rillig Exp $ */ | | 1 | /* $NetBSD: err.c,v 1.70 2021/01/30 17:56:29 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.69 2021/01/17 17:14:34 rillig Exp $"); | | 40 | __RCSID("$NetBSD: err.c,v 1.70 2021/01/30 17:56:29 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; |
| @@ -238,27 +238,27 @@ const char *msgs[] = { | | | @@ -238,27 +238,27 @@ const char *msgs[] = { |
238 | "invalid initializer type %s", /* 176 */ | | 238 | "invalid initializer type %s", /* 176 */ |
239 | "non-constant initializer", /* 177 */ | | 239 | "non-constant initializer", /* 177 */ |
240 | "initializer does not fit", /* 178 */ | | 240 | "initializer does not fit", /* 178 */ |
241 | "cannot initialize struct/union with no named member", /* 179 */ | | 241 | "cannot initialize struct/union with no named member", /* 179 */ |
242 | "bit-field initializer does not fit", /* 180 */ | | 242 | "bit-field initializer does not fit", /* 180 */ |
243 | "{}-enclosed initializer required", /* 181 */ | | 243 | "{}-enclosed initializer required", /* 181 */ |
244 | "incompatible pointer types (%s != %s)", /* 182 */ | | 244 | "incompatible pointer types (%s != %s)", /* 182 */ |
245 | "illegal combination of %s (%s) and %s (%s)", /* 183 */ | | 245 | "illegal combination of %s (%s) and %s (%s)", /* 183 */ |
246 | "illegal pointer combination", /* 184 */ | | 246 | "illegal pointer combination", /* 184 */ |
247 | "initialisation type mismatch (%s) and (%s)", /* 185 */ | | 247 | "initialisation type mismatch (%s) and (%s)", /* 185 */ |
248 | "bit-field initialisation is illegal in traditional C", /* 186 */ | | 248 | "bit-field initialisation is illegal in traditional C", /* 186 */ |
249 | "non-null byte ignored in string initializer", /* 187 */ | | 249 | "non-null byte ignored in string initializer", /* 187 */ |
250 | "no automatic aggregate initialization in traditional C", /* 188 */ | | 250 | "no automatic aggregate initialization in traditional C", /* 188 */ |
251 | "assignment of struct/union illegal in traditional C", /* 189 */ | | 251 | "", /* no longer used */ /* 189 */ |
252 | "empty array declaration: %s", /* 190 */ | | 252 | "empty array declaration: %s", /* 190 */ |
253 | "%s set but not used in function %s", /* 191 */ | | 253 | "%s set but not used in function %s", /* 191 */ |
254 | "%s unused in function %s", /* 192 */ | | 254 | "%s unused in function %s", /* 192 */ |
255 | "statement not reached", /* 193 */ | | 255 | "statement not reached", /* 193 */ |
256 | "label %s redefined", /* 194 */ | | 256 | "label %s redefined", /* 194 */ |
257 | "case not in switch", /* 195 */ | | 257 | "case not in switch", /* 195 */ |
258 | "case label affected by conversion", /* 196 */ | | 258 | "case label affected by conversion", /* 196 */ |
259 | "non-constant case expression", /* 197 */ | | 259 | "non-constant case expression", /* 197 */ |
260 | "non-integral case expression", /* 198 */ | | 260 | "non-integral case expression", /* 198 */ |
261 | "duplicate case in switch: %ld", /* 199 */ | | 261 | "duplicate case in switch: %ld", /* 199 */ |
262 | "duplicate case in switch: %lu", /* 200 */ | | 262 | "duplicate case in switch: %lu", /* 200 */ |
263 | "default outside switch", /* 201 */ | | 263 | "default outside switch", /* 201 */ |
264 | "duplicate default in switch", /* 202 */ | | 264 | "duplicate default in switch", /* 202 */ |