| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: func.c,v 1.150 2023/03/28 14:44:35 rillig Exp $ */ | | 1 | /* $NetBSD: func.c,v 1.151 2023/03/28 20:01:21 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) | | 39 | #if defined(__RCSID) |
40 | __RCSID("$NetBSD: func.c,v 1.150 2023/03/28 14:44:35 rillig Exp $"); | | 40 | __RCSID("$NetBSD: func.c,v 1.151 2023/03/28 20:01:21 rillig Exp $"); |
41 | #endif | | 41 | #endif |
42 | | | 42 | |
43 | #include <stdlib.h> | | 43 | #include <stdlib.h> |
44 | #include <string.h> | | 44 | #include <string.h> |
45 | | | 45 | |
46 | #include "lint1.h" | | 46 | #include "lint1.h" |
47 | #include "cgram.h" | | 47 | #include "cgram.h" |
48 | | | 48 | |
49 | /* | | 49 | /* |
50 | * Contains a pointer to the symbol table entry of the current function | | 50 | * Contains a pointer to the symbol table entry of the current function |
51 | * definition. | | 51 | * definition. |
52 | */ | | 52 | */ |
53 | sym_t *funcsym; | | 53 | sym_t *funcsym; |
| @@ -1314,30 +1314,27 @@ not_reached(int n) | | | @@ -1314,30 +1314,27 @@ not_reached(int n) |
1314 | void | | 1314 | void |
1315 | lintlib(int n) | | 1315 | lintlib(int n) |
1316 | { | | 1316 | { |
1317 | | | 1317 | |
1318 | if (dcs->d_kind != DK_EXTERN) { | | 1318 | if (dcs->d_kind != DK_EXTERN) { |
1319 | /* comment ** %s ** must be outside function */ | | 1319 | /* comment ** %s ** must be outside function */ |
1320 | warning(280, "LINTLIBRARY"); | | 1320 | warning(280, "LINTLIBRARY"); |
1321 | return; | | 1321 | return; |
1322 | } | | 1322 | } |
1323 | llibflg = true; | | 1323 | llibflg = true; |
1324 | vflag = false; | | 1324 | vflag = false; |
1325 | } | | 1325 | } |
1326 | | | 1326 | |
1327 | /* | | 1327 | /* Suppress one or most warnings at the current and the following line. */ |
1328 | * Suppress most warnings at the current and the following line. | | | |
1329 | */ | | | |
1330 | /* ARGSUSED */ | | | |
1331 | void | | 1328 | void |
1332 | linted(int n) | | 1329 | linted(int n) |
1333 | { | | 1330 | { |
1334 | | | 1331 | |
1335 | debug_step("set lwarn %d", n); | | 1332 | debug_step("set lwarn %d", n); |
1336 | lwarn = n; | | 1333 | lwarn = n; |
1337 | } | | 1334 | } |
1338 | | | 1335 | |
1339 | /* | | 1336 | /* |
1340 | * Suppress bitfield type errors on the current line. | | 1337 | * Suppress bitfield type errors on the current line. |
1341 | */ | | 1338 | */ |
1342 | /* ARGSUSED */ | | 1339 | /* ARGSUSED */ |
1343 | void | | 1340 | void |