Sun Jan 3 18:35:51 2021 UTC ()
lint: remove redundant include of externs1.h

It is already included by lint1.h.


(rillig)
diff -r1.7 -r1.8 src/usr.bin/xlint/lint1/print.c
diff -r1.118 -r1.119 src/usr.bin/xlint/lint1/tree.c

cvs diff -r1.7 -r1.8 src/usr.bin/xlint/lint1/Attic/print.c (expand / switch to unified diff)

--- src/usr.bin/xlint/lint1/Attic/print.c 2020/12/30 10:56:51 1.7
+++ src/usr.bin/xlint/lint1/Attic/print.c 2021/01/03 18:35:51 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: print.c,v 1.7 2020/12/30 10:56:51 rillig Exp $ */ 1/* $NetBSD: print.c,v 1.8 2021/01/03 18:35:51 rillig Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Christos Zoulas. 8 * by Christos Zoulas.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -25,33 +25,32 @@ @@ -25,33 +25,32 @@
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#if HAVE_NBTOOL_CONFIG_H 32#if HAVE_NBTOOL_CONFIG_H
33#include "nbtool_config.h" 33#include "nbtool_config.h"
34#endif 34#endif
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37#ifndef lint 37#ifndef lint
38__RCSID("$NetBSD: print.c,v 1.7 2020/12/30 10:56:51 rillig Exp $"); 38__RCSID("$NetBSD: print.c,v 1.8 2021/01/03 18:35:51 rillig Exp $");
39#endif 39#endif
40 40
41#include <stdio.h> 41#include <stdio.h>
42 42
43#include "lint1.h" 43#include "lint1.h"
44#include "externs1.h" 
45 44
46static const char *str_op_t[] = 45static const char *str_op_t[] =
47{ 46{
48 "*noop*", 47 "*noop*",
49 "->", 48 "->",
50 ".", 49 ".",
51 "!", 50 "!",
52 "~", 51 "~",
53 "++", 52 "++",
54 "--", 53 "--",
55 "++<", 54 "++<",
56 "--<", 55 "--<",
57 "++>", 56 "++>",

cvs diff -r1.118 -r1.119 src/usr.bin/xlint/lint1/tree.c (expand / switch to unified diff)

--- src/usr.bin/xlint/lint1/tree.c 2021/01/03 17:42:45 1.118
+++ src/usr.bin/xlint/lint1/tree.c 2021/01/03 18:35:51 1.119
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tree.c,v 1.118 2021/01/03 17:42:45 rillig Exp $ */ 1/* $NetBSD: tree.c,v 1.119 2021/01/03 18:35:51 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,39 +27,38 @@ @@ -27,39 +27,38 @@
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: tree.c,v 1.118 2021/01/03 17:42:45 rillig Exp $"); 40__RCSID("$NetBSD: tree.c,v 1.119 2021/01/03 18:35:51 rillig Exp $");
41#endif 41#endif
42 42
43#include <float.h> 43#include <float.h>
44#include <limits.h> 44#include <limits.h>
45#include <math.h> 45#include <math.h>
46#include <signal.h> 46#include <signal.h>
47#include <stdlib.h> 47#include <stdlib.h>
48#include <string.h> 48#include <string.h>
49 49
50#include "lint1.h" 50#include "lint1.h"
51#include "cgram.h" 51#include "cgram.h"
52#include "externs1.h" 
53 52
54static tnode_t *new_int_const_node(tspec_t, int64_t); 53static tnode_t *new_int_const_node(tspec_t, int64_t);
55static void check_pointer_comparison(op_t, tnode_t *, tnode_t *); 54static void check_pointer_comparison(op_t, tnode_t *, tnode_t *);
56static int check_assign_types_compatible(op_t, int, tnode_t *, tnode_t *); 55static int check_assign_types_compatible(op_t, int, tnode_t *, tnode_t *);
57static void check_bad_enum_operation(op_t, tnode_t *, tnode_t *); 56static void check_bad_enum_operation(op_t, tnode_t *, tnode_t *);
58static void check_enum_type_mismatch(op_t, int, tnode_t *, tnode_t *); 57static void check_enum_type_mismatch(op_t, int, tnode_t *, tnode_t *);
59static void check_enum_int_mismatch(op_t, int, tnode_t *, tnode_t *); 58static void check_enum_int_mismatch(op_t, int, tnode_t *, tnode_t *);
60static tnode_t *new_tnode(op_t, type_t *, tnode_t *, tnode_t *); 59static tnode_t *new_tnode(op_t, type_t *, tnode_t *, tnode_t *);
61static void balance(op_t, tnode_t **, tnode_t **); 60static void balance(op_t, tnode_t **, tnode_t **);
62static void warn_incompatible_types(op_t, tspec_t, tspec_t); 61static void warn_incompatible_types(op_t, tspec_t, tspec_t);
63static void warn_incompatible_pointers(mod_t *, type_t *, type_t *); 62static void warn_incompatible_pointers(mod_t *, type_t *, type_t *);
64static void merge_qualifiers(type_t **, type_t *, type_t *); 63static void merge_qualifiers(type_t **, type_t *, type_t *);
65static int has_constant_member(type_t *); 64static int has_constant_member(type_t *);