CVS log for src/usr.bin/xlint/xlint/xlint.c
Up to [cvs.NetBSD.org] / src / usr.bin / xlint / xlint
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.126: download - view: text, markup, annotated - select for diffs
Sun Dec 8 17:12:01 2024 UTC (6 weeks, 6 days ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +3 -2
lines
lint: warn about do-while macros that end with a semicolon
Revision 1.125: download - view: text, markup, annotated - select for diffs
Sun May 12 18:49:36 2024 UTC (8 months, 2 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +3 -3
lines
lint: add wrapper for <ctype.h> functions, for strict bool mode
When using the Clang preprocessor (with MKLLVM=yes), the preprocessor
output does not indicate which tokens come from a system header and
which tokens come from the user code. Lint's strict bool mode relies on
this information to treat the character classification functions from
<ctype.h> as if their return type were bool instead of int.
These wrapper functions are only used when their argument is indeed a
'char', but not when the argument might be 'EOF or representable as an
unsigned char', such as when reading a byte from the input.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Sun May 12 18:00:59 2024 UTC (8 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -3
lines
lint: remove unused flag '-u' from lint1
This flag is completely handled by lint2.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Sat Mar 2 09:32:19 2024 UTC (10 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +5 -5
lines
lint: remove custom wrappers around <ctype.h> functions
Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Jan 20 12:02:10 2024 UTC (12 months ago) by rillig
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +40 -49
lines
lint: clean up
Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Dec 10 14:59:47 2023 UTC (13 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +3 -3
lines
lint: clean up comments
No functional change.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Sun Dec 3 18:17:41 2023 UTC (13 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -3
lines
lint: in declarations, replace tab with space
Previously, in some cases, the keywords 'const' or 'struct' were
followed by a tab, which doesn't make sense.
No functional change.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Sun Dec 3 13:12:40 2023 UTC (13 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -4
lines
lint: re-wrap comments
No functional change.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Sun Dec 3 12:03:38 2023 UTC (13 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +4 -4
lines
lint: indent statement continuations consistently
No binary change.
Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Oct 26 20:21:13 2023 UTC (15 months ago) by rillig
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +8 -8
lines
lint: reduce number of negations, fix variable name
No functional change.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Oct 26 19:56:31 2023 UTC (15 months ago) by rillig
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +13 -15
lines
lint: merge redundant variables
No functional change.
Revision 1.115: download - view: text, markup, annotated - select for diffs
Wed Oct 25 23:05:14 2023 UTC (15 months ago) by rillig
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +45 -66
lines
lint: make variable names more expressive, remove redundant comments
No functional change.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:40:38 2023 UTC (18 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +3 -3
lines
lint: indent copyright lines consistently
Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Jul 3 11:16:32 2023 UTC (18 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +12 -15
lines
lint: sync usage messages with reality
Revision 1.112: download - view: text, markup, annotated - select for diffs
Wed Jun 28 13:50:47 2023 UTC (18 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +6 -3
lines
lint: allow to keep the preprocessor output on success as well
Revision 1.111: download - view: text, markup, annotated - select for diffs
Fri Jun 9 13:31:11 2023 UTC (19 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +265 -270
lines
lint: sort functions in calling order
No functional change.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Fri Jun 9 13:03:49 2023 UTC (19 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +11 -11
lines
lint: indent local variables consistently
No binary change.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Feb 19 19:27:02 2023 UTC (23 months ago) by rillig
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +8 -9
lines
lint: make basename simpler
There is no need to handle trailing slashes since lint only handles
regular files in diagnostics, not directories. Furthermore, only the
last '/' was ignored, but multiple trailing slashes would not.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Jan 22 15:20:01 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -4
lines
lint: repurpose the '-d' option to specify DESTDIR
Previously, passing '-nostdinc -isystem $dir' only searched the given
directory but not any compiler-specific directories.
Discovered by fontconfig, which includes <stdatomic.h> from C11, which
lives in /usr/include/gcc-10 instead of /usr/include.
Change the preprocessor options to '--sysroot' instead, to align them
with how the compiler is invoked using build.sh.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Jan 21 11:29:30 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -3
lines
lint: catch more write errors when copying files
Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Jan 21 11:22:21 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +42 -70
lines
lint: remove unnecessary abstraction layer for passing arguments
The abstraction layer of the pass_to functions wasn't worth its weight.
After inlining the functions, the code is even clearer than before.
No functional change.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Fri Jan 20 23:06:26 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -3
lines
lint: keep output from cpp if cpp fails
Previously, lint only kept the cpp output if lint1 failed. Due to
subtle differences in the preprocessing, there can be cases where the
preprocessor already fails, for example when it takes a different
'#ifdef' branch and therefore tries to include nonexistent files. In
such a case, preserving the output of the preprocessor is helpful to
compare it with the regular output of cpp, so keep it.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun Jan 15 23:32:10 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +3 -3
lines
xlint: fix null pointer dereference for lint -V (since today)
Building the argument lists further away from the vfork call in xlint.c
1.100 had the side effect that the trailing null pointer was added
outside run_child.
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sun Jan 15 22:26:49 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +28 -29
lines
lint: clean up main function
No functional change.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun Jan 15 22:06:37 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +80 -83
lines
lint: extract run_cpp and run_lint1 to separate functions
Move run_lint2 further to the top, to save a forward declaration.
No functional change.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sun Jan 15 21:46:15 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +8 -13
lines
lint: reduce number of local variables in lbasename
No functional change.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Sun Jan 15 21:27:36 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +8 -10
lines
lint: move argument list modification further away from vfork
Just to be on the safe side.
While here, don't allocate argument strings needlessly.
No functional change.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Sun Jan 15 15:20:18 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +84 -127
lines
lint: turn O(n^2) to O(n) for list of arguments to lint child processes
Previously, adding an argument to the lint child processes (cpp, lint1,
lint2) each time searched the list of arguments for the terminating
null pointer and then reallocated the memory for storing the strings.
Replace the above with a standard resizable array implementation and
give it a proper name, to avoid 'char ***' in the code.
The terminating null pointer in the lists is only required when passing
the list to execvp. In all other cases it's not needed, so drop it.
No functional change.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Jan 15 14:43:39 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +29 -36
lines
lint: rename local functions to be more readable
No functional change.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sat Jan 14 10:38:36 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +6 -6
lines
lint: explicitly ignore errors when printing status messages
No binary change.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Jan 14 09:21:58 2023 UTC (2 years ago) by rillig
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +6 -11
lines
lint: remove unnecessary MBLKSIZ, use stack buffer in xlint
No functional change.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Sat Oct 1 09:48:02 2022 UTC (2 years, 3 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
netbsd-10-1-RELEASE,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +4 -4
lines
lint: remove redundant cast
Since C90 prototypes, integer arguments are converted to the correct
parameter type.
No functional change.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue Jul 5 22:50:41 2022 UTC (2 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +4 -3
lines
lint: add additional queries that are not enabled by default
In the last 18 months, several lint warnings have been made adjusted to
allow common usage patterns. For example, lint no longer warns about a
constant condition in the statement 'do { ... } while (false)' (message
161), as this pattern is well-known in statement-like macros, making it
unlikely that the 'false' is a mistake. Another example is casts
between unequal pointer types (message 247) for a few well-known
patterns that are unlikely to be bugs.
Occasionally, it is useful to query the code for patterns or events that
would not justify a warning. These patterns are modeled as predefined
queries that can be selected individually, in addition to and
independently of the existing warnings and errors.
New queries can be added as needed, in the same way as new warnings.
Queries that are deemed no longer used can be deactivated in the same
way as warnings that are no longer used.
As long as none of the queries is enabled, they produce a minimal
overhead of querying a single global variable. Computations that are
more expensive than a few machine instructions should be guarded by
any_query_enabled.
https://mail-index.netbsd.org/source-changes-d/2022/06/28/msg013716.html
ok christos@
Revision 1.93: download - view: text, markup, annotated - select for diffs
Mon May 30 23:02:02 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +7 -6
lines
lint: clean up usage messages
The two synopsis forms differed in the spelling of 'file ...'.
The options string for getopt does not start with ':', which led to a
duplicate message 'unknown option -- ?' followed by 'Unknown flag ?'.
Be more specific when calling 'lint file.c -u'; the message 'Unknown
argument' was not helpful as it didn't pinpoint that there are two
different phases for parsing options. In the second phase, only the
options '-L' and '-l' are recognized.
In the manual page, mention the difference between the two synopsis
forms as early as possible. The two synopsis forms are very similar and
both have far to many options to see the difference at a glance.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri May 20 21:18:55 2022 UTC (2 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -3
lines
lint: use __RCSID in lint mode as well
Since 1995-10-02, lint supports __asm statements and __asm modifiers.
No binary change.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Sat Apr 16 00:15:47 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +16 -6
lines
lint: skip duplicate -llib and -Llibdir options
This removes many of the currently 26.000 'multiply defined' lines from
a typical NetBSD build. Duplicate libraries happen a lot due to
overlapping transitive dependencies. An example is usr.bin/telnet,
which links to -lcrypto and several other libraries twice.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Apr 15 16:08:39 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +40 -4
lines
lint: in verbose mode, quote shell commands in output
Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue Mar 8 23:24:20 2022 UTC (2 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3
lines
lint: fix typo in comment
No binary change.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Tue Dec 28 22:59:56 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -3
lines
lint: do not output "Lint pass2:"
A colon at the end of a line requires at least 1 follow-up line, but
xlint cannot know whether lint2 will find anything to complain about.
Having a colon followed by nothing creates unnecessary confusion.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Tue Dec 14 16:22:30 2021 UTC (3 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +4 -3
lines
Also accept -W to pass to cpp
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Nov 28 02:54:26 2021 UTC (3 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +2 -4
lines
remove extra line
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Nov 28 02:07:02 2021 UTC (3 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +37 -17
lines
Explain the usage errors.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Nov 21 10:39:47 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +35 -34
lines
lint: rename list_add to list_add_ref and list_add_copy to list_add
The function for copying the string is used more often, so use the
simpler name for it.
No functional change.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Nov 21 10:08:10 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -7
lines
lint: remove redundant function prototypes
Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Sep 5 18:17:15 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +2 -4
lines
lint: hide irrelevant type information from lint2
No functional change.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Sep 5 16:15:05 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +3 -3
lines
lint: fix some more lint warnings
The only remaining warnings are in scan.c, which is a generated Flex
scanner.
No functional change.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Aug 28 14:42:29 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -4
lines
lint: explicitly ignore the return value of close
Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Aug 20 05:45:19 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -5
lines
mkdep: make argument of findcc const
Previously, findcc modified its argument string, even though it had been
declared as 'const char *'. This triggered a lint warning that "strchr
effectively discards 'const char *' from argument", in fact, this code
caused the lint check to be implemented in the first place.
The first attempt at fixing it by removing the 'const' from the
parameter type was a bad idea since it made the API of that function
more complicated.
Revert back to making the parameter a 'const char *' and duplicate that
string internally as necessary. Add a few more tests for absolute
pathnames since these had been missing before. There are no tests yet
for snprintf with too long strings, but the current change does not
modify that part of the code.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Aug 19 21:21:04 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +5 -4
lines
mkdep: fix prototype of findcc
A function that modifies a string argument must not declare that
argument as 'const char *', even if all callers (mkdep and lint) always
pass it a modifiable string.
No functional change.
Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Aug 19 16:29:41 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +9 -10
lines
lint: remove redundant variable Bflag
No functional change.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Aug 19 16:18:43 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -4
lines
lint: remove unused static variable
Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Aug 19 16:15:31 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +6 -12
lines
lint: simplify code for adding '-l' and '-L' to libraries
No functional change.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Aug 19 16:05:56 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +10 -24
lines
lint: merge duplicate code for passing flags to subprocesses
No functional change.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Thu Aug 19 15:55:23 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +46 -26
lines
lint: uniformly pass command line flags to subprocesses
No functional change.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Aug 9 21:27:20 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +2 -10
lines
lint: remove commented-out preprocessor options
These have been commented out since 2002.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sun Aug 8 16:19:18 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +82 -90
lines
lint: group global variables by the subprocess
No functional change.
Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Aug 8 16:11:08 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +11 -11
lines
lint: rename list_free to list_clear
The previous name suggested that the function would free the list
itself, which it doesn't.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Aug 8 15:29:24 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +4 -11
lines
lint: remove dead code for reading from stdin
Since xlint.c 1.27 from 2002-01-31, it has not been possible to read
from stdin anymore. Apparently nobody missed this feature in the last
19 years.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Aug 8 15:06:44 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -26
lines
lint: inline list_add_defines
No functional change.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Aug 8 15:03:47 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +81 -81
lines
lint: rename functions for handling string lists
No functional change.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Aug 8 14:05:33 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +28 -25
lines
lint: make data flow in findlibs simpler
No functional change.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Sun Aug 8 13:34:57 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +11 -23
lines
lint: make memory management in xlint simpler
No functional change.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Aug 1 18:13:53 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +4 -4
lines
lint: make xasprintf simpler
No functional change.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun May 2 21:05:42 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +9 -4
lines
lint: on request, keep the preprocessor output
Previously, the simplest way of getting the preprocessed translation
unit was to run lint with the additional flag -V, which outputs the
command line of the C preprocessor, among other things. That command
line does not include the proper quoting though, so it cannot be used
verbatim as a shell command if the command line contains spaces such as
in -Du64="unsigned long long".
In the common situation where lint is run via a Makefile, the option -V
had to be added in the Makefile itself since there is no make variable
for additional user-settable lint flags. This is not straight-forward
enough.
Adding another command line option for this purpose would reduce the
remaining namespace for options. Most of the 52 letters are already
used up.
To make this situation as simple as possible, preserve the output of the
C preprocessor depending on an environment variable.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Apr 18 22:51:25 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3
lines
lint: remove WARNS=3, falling back to the default WARNS=5
It's strange that GCC does not warn about the nonliteral format strings
in lint1/err.c, lint2/msg.c and lint2/read.c, despite -Wformat=2, but
Clang does.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Wed Apr 14 20:35:31 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +62 -41
lines
lint: un-abbreviate code for passing options to cpp, lint1 and lint2
No functional change.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Wed Apr 14 20:06:40 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +9 -4
lines
lint: add option to accept C11 features
The list of available letters for the command line options gets shorter
and shorter. Most of the interesting letters are already used for some
warning categories. Curiously, -A, -W and -E were all still available.
The option -A nicely matches the intention of the option, which is to
allow a certain set of language features. To keep the option available
for further extensions, define -Ac11 as the currently only valid option
of that kind. This allows straight-forward extension for C17 and future
language standards, as well as independent feature-sets. The options -W
and -E may someday complement the -A option, using the allow/warn/error
categories.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Apr 14 19:25:48 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +15 -11
lines
lint: arrange options in the usage messages
* lowercase the word 'usage'
* group the preprocessor flags on a line of their own
* add missing closing ']' for '-X'
* properly indent the lines
Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Apr 2 12:16:50 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +24 -24
lines
lint: add parentheses after sizeof, as required by share/misc/style
No functional change.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Mar 26 20:31:07 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +24 -24
lines
lint: in malloc calls, use 'sizeof *ptr' instead of 'sizeof(type)'
No functional change.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Jan 16 16:53:24 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +13 -13
lines
lint: replace integer constant expressions with true and false
LINTFLAGS=-gST make lint, with manual review.
The error messages from lint are all correct, they are not complete
though. The return value of a function returning bool may still be
compared to the integer 0.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Jan 16 16:03:46 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +9 -3
lines
lint: in strict bool mode, integer constants do not have type bool
Previously, lint1 allowed integer constants such as 0 and 1 to be used
as bool constants. This was only half-baked since after fixing all
error messages from that strict mode, there may still be integer
literals in the code that should be replaced with true or false. This
would stop a migration from int to bool in the middle, leaving
inconsistent code around.
To find the remaining type inconsistencies, treat integers and bool as
completely incompatible, even for compile time constants.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Jan 16 02:40:03 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +16 -16
lines
lint: replace 0 and 1 with false and true, where appropriate
Change in behavior: Passing the option -h exactly 4294967296 times or
any multiple thereof is no longer equivalent to passing it never at all,
it is now equivalent to passing it once. See main2.c, hflag++ for the
actual change.
Other than that, no functional change intended.
A very large portion of the code already conformed to the requirements
of the strict bool mode. The only missing thing was using the constant
literals false and true instead of 0 and 1. For sure there are some
integer literals left that can be converted. For now, all literals that
appeared in the form " = 0" or " = 1" have been replaced.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Jan 12 20:42:01 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +7 -5
lines
lint: add new check for strict bool mode
In strict bool mode, bool is considered incompatible with all other
scalar types, just as in Java, C#, Pascal.
The controlling expressions in if statements, while loops, for loops and
the '?:' operator must be of type bool. The logical operators work on
bool instead of int, the bitwise operators accept both integer and bool.
The arithmetic operators don't accept bool.
Since <stdbool.h> implements bool using C preprocessor macros instead of
predefining the identifiers "true" and "false", the integer constants 0
and 1 may be used in all contexts that require a bool expression.
Except from these, no implicit conversion between bool and scalar types
is allowed.
See usr.bin/tests/xlint/lint1/d_c99_bool_strict.c for more details.
The command line option -T has been chosen because all obvious choices
(-b or -B for bool, -s or -S for strict) are already in use. The -T may
stand for "types are checked strictly".
The default behavior of lint doesn't change. The strict bool check is
purely optional.
An example program for strict bool mode is usr.bin/make, which has been
using explicit comparisons such as p != NULL, ch != '\0' or n > 0 in
most places for a long time now, even before the refactoring in 2020.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Jan 4 22:26:51 2021 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3
lines
lint: fix typos and other minor stylistic issues
Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Dec 29 11:35:11 2020 UTC (4 years ago) by rillig
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +9 -9
lines
lint: remove redundant parentheses around return value
Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat May 23 17:28:27 2020 UTC (4 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +9 -5
lines
Use -Z to pass arguments to ccp(1) directly. Can be used as:
-Z-include -Zfile.h
Revision 1.46.14.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:09:19 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.46.14.1: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.14.1: +4 -7
lines
Merge changes from current as of 20200406
Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Feb 10 04:54:01 2020 UTC (4 years, 11 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
is-mlppp-base,
is-mlppp
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -8
lines
use asprintf().
Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Feb 9 08:10:25 2020 UTC (4 years, 11 months ago) by fox
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +6 -6
lines
usr.bin/xlint: Fix -Werror=format-overflow= error.
Replace sprintf(3) with snprintf(3).
Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
Reviewed by: kamil@
Revision 1.46.14.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:27 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -2
lines
Sync with HEAD
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Apr 13 15:08:49 2019 UTC (5 years, 9 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20191119,
phil-wifi-20190609,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -2
lines
Undefine SSE stuff; we don't want portable code to depend on it and we
don't provide the necessary headers.
Revision 1.44.24.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:59 2017 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.44: preferred, colored; next MAIN 1.45: preferred, colored
Changes since revision 1.44: +9 -5
lines
Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Dec 24 17:43:45 2016 UTC (8 years, 1 month ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-8-base,
netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: phil-wifi
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +9 -5
lines
Add -R (source filename remapping) for MKREPRO
Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Sep 5 00:40:30 2016 UTC (8 years, 4 months ago) by sevan
Branches: MAIN
CVS tags: pgoyette-localcount-20161104,
localcount-20160914
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -4
lines
Drop main() prototype.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun Sep 18 09:07:35 2011 UTC (13 years, 4 months ago) by njoly
Branches: MAIN
CVS tags: yamt-pagecache-tag8,
yamt-pagecache-base9,
yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
yamt-pagecache,
tls-maxphys-base,
tls-maxphys,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
agc-symver-base,
agc-symver
Branch point for: pgoyette-localcount
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -3
lines
Fix lseek(2) swapped arguments.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Mar 22 01:29:30 2010 UTC (14 years, 10 months ago) by mrg
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +3 -3
lines
convert -idirafter to -isystem, as recommended by cgd in PR 11843.
most of the list in that PR were already done.
Revision 1.40.6.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:20:13 2009 UTC (15 years, 8 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40: +13 -11
lines
Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Apr 15 01:20:57 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
CVS tags: matt-premerge-20091211,
jym-xensuspend-nbase,
jym-xensuspend-base
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +7 -7
lines
Lukemify (WARNS=4)
Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Apr 14 09:08:39 2009 UTC (15 years, 9 months ago) by lukem
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +8 -6
lines
fix -Wcast-qual issues
Revision 1.38.6.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:29:28 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +8 -3
lines
Sync with wrstuden-revivesa-base-2.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Aug 29 00:44:48 2008 UTC (16 years, 5 months ago) by gmcgarry
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-base2
Branch point for: jym-xensuspend
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -2
lines
Undefine __PCC__ the same as __GNUC__ inside lint.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Jul 31 15:25:18 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +7 -3
lines
enable -P
Revision 1.37.12.1: download - view: text, markup, annotated - select for diffs
Sun Mar 23 00:49:04 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +5 -2
lines
sync with HEAD
Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Jan 10 05:15:07 2008 UTC (17 years ago) by lukem
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pf42-base,
yamt-pf42,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
matt-armv6-nbase,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-nbase,
hpcarm-cleanup-base
Branch point for: wrstuden-revivesa
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -2
lines
Convert to using raise_default_signal(3).
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Jun 2 04:38:46 2005 UTC (19 years, 7 months ago) by lukem
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf,
chap-midi-nbase,
chap-midi-base,
chap-midi,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Branch point for: matt-armv6
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -2
lines
appease gcc -Wuninitialized
Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Feb 9 21:24:48 2005 UTC (19 years, 11 months ago) by dsl
Branches: MAIN
CVS tags: netbsd-3-base,
netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0,
netbsd-3
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -4
lines
Only pass -Wtraditional to cpp for lint -t ...
Stops warnings about pre-processor constructs like #elif - which there is
no point detecting now that we've changed much of the code to require an
ANSI C compiler.
Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 23 15:03:58 2004 UTC (20 years, 6 months ago) by tron
Branches: netbsd-1-6
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +4 -2
lines
Apply patch (requested by dbj in ticket 1724):
Fix problems when building the netbsd-1-6 branch with GCC 3.3.3.
Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 22 07:23:26 2004 UTC (20 years, 7 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +6 -2
lines
Pull up revision 1.35 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Jun 20 22:20:17 2004 UTC (20 years, 7 months ago) by jmc
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -2
lines
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Jan 26 21:51:11 2004 UTC (21 years ago) by dsl
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -3
lines
Pass -MD through to cpp so that it can generate a depend file.
(Actually pass any -M <arg> through, but -MD is most useful.)
Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Oct 27 00:12:44 2003 UTC (21 years, 3 months ago) by lukem
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -3
lines
Overhaul how `build.sh tools' are used:
* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h
* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.
These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Jan 6 13:10:31 2003 UTC (22 years ago) by wiz
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3
lines
synchronous, not syncronous.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Nov 24 20:24:54 2002 UTC (22 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: fvdl_fs64_base
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -2
lines
Skip passing -$ to the preprocessor, for now.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Oct 21 21:16:13 2002 UTC (22 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +13 -7
lines
add -S flag for c99 support.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Jul 20 08:40:17 2002 UTC (22 years, 6 months ago) by grant
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -3
lines
sweep of errx/warnx, remove unnecessary trailing \n
Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Jun 14 23:20:42 2002 UTC (22 years, 7 months ago) by simonb
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +24 -19
lines
Use findcc() from ../mkdep so ${CC} can contain multiple tokens instead
of trying to exec the whole contents of ${CC}.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jan 31 19:09:33 2002 UTC (23 years ago) by tv
Branches: MAIN
CVS tags: netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001
Branch point for: netbsd-1-6
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +52 -19
lines
* Use setprogname() in main().
* Don't grossly abuse getopt(); allow only -l and -L after filenames are
encountered, and do the parsing of these options manually.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jan 22 01:14:03 2002 UTC (23 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -2
lines
Add a missing "break;" statement so that this actually works again.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Jan 21 19:49:52 2002 UTC (23 years ago) by tv
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +20 -15
lines
Add hooks for compiling on non-NetBSD hosts.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Oct 24 02:31:10 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +22 -6
lines
Add support for putting prefixes on the name of lint(1)'s front
and back ends. This means that it can be built as a cross tool.
Part of the fix for bin/14280.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon May 28 12:40:38 2001 UTC (23 years, 8 months ago) by lukem
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +52 -71
lines
cleanup (prior to more adding more features):
- convert to ANSI KNF
- remove trailing whitespace
- translate some comments from german into english
code compiles and runs clean, and tested by running "make lint" against
xlint source using previous and this lint produces same results.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Feb 19 23:03:53 2001 UTC (23 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +5 -5
lines
convert to use getprogname()
Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Nov 27 00:54:25 2000 UTC (24 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -7
lines
Handle arguments in a slightly more standard way (avoid resetting optind).
Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Jul 6 01:12:24 2000 UTC (24 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +18 -8
lines
pass -X <id>[,<id>]... and -w to lint1
Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 29 23:56:58 2000 UTC (24 years, 7 months ago) by thorpej
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE,
netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001,
netbsd-1-5-BETA2,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +3 -3
lines
Pull up rev. 1.19:
Use execvp() instead of execv(). Deals with the case where CC, the compiler,
is not a full path. For instance, "cc".
Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Jun 29 02:56:47 2000 UTC (24 years, 7 months ago) by wrstuden
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3
lines
Use execvp() instead of execv(). Deals with the case where CC, the compiler,
is not a full path. For instance, "cc".
Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 23 16:40:22 2000 UTC (24 years, 7 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +2 -2
lines
Sync w/ netbsd-1-5-base.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Jun 14 06:49:24 2000 UTC (24 years, 7 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2
lines
fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Mar 22 01:09:34 2000 UTC (24 years, 10 months ago) by garbled
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +32 -11
lines
Add parsing of the CC env variable, and a -Bpath flag (for /usr/libexec)
so cross-building of lint libraries can be made possible. Tested
building a powerpc libc via make build on an alpha.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Sep 9 09:34:25 1999 UTC (25 years, 4 months ago) by kleink
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
comdex-fall-1999-base,
comdex-fall-1999
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -2
lines
Define __LINT__, per XCU5.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Sep 7 02:36:57 1999 UTC (25 years, 4 months ago) by jwise
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +14 -13
lines
Slight improvement to last fix: don't need to reset the cpp tempfile for
files which don't need to be run through cpp. Also, use vfork() instead of
fork().
Both from Anders Hjalmarsson (Anders.Hjalmarsson@economics.gu.se)
Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Sep 6 06:45:20 1999 UTC (25 years, 4 months ago) by jwise
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +11 -4
lines
Apply fix from PR bin/8328 by Anders Hjalmarsson (Anders.Hjalmarsson@economics.gu.se):
work properly again when passwd multiple files on the command line.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon May 3 15:45:01 1999 UTC (25 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4
lines
More cosmetics in the usage message...
Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon May 3 15:23:27 1999 UTC (25 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +15 -7
lines
Now that we use cc -E, -U__GNUC__ to avoid gnu extensions. Nuke the
__attribute__ and __extension__ workarounds.
Our invariant is: No gcc extensions if __GNUC__ is not defined, so lint
should not be playing around trying to pretend it is gcc.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Apr 29 12:40:39 1999 UTC (25 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2
lines
Deal with gcc __extension__({ }). We assume that it returns a value 0, and
we prepend a /*NOSTRICT*/ comment to avoid constant in conditional context
warning.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Apr 22 04:40:58 1999 UTC (25 years, 9 months ago) by mrg
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +64 -60
lines
use "cc -E" not cpp directly. this allows lint(1) to be unaware of any
machine-dependant defines that cc(1) may normally define, and also
means that the mips ports work again.
Revision 1.9.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 7 23:27:22 1999 UTC (25 years, 9 months ago) by simonb
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +11 -4
lines
Use the C preprocessor define "__mips__" instead of "__mipse{b,l}__"
if we are running on a mipseb or mipsel platform.. This is the same
behaviour as the C compiler.
NOTE: This is only applied to the 1.4 branch. A proper long-term fix
using the equivalent of "${CC} -E" instead of lint(1) trying to
guess what to define will be coming.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Dec 9 12:28:36 1998 UTC (26 years, 1 month ago) by christos
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3
lines
pass -CC instead of -C to cpp so that we preserve macro comments in place.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Oct 8 08:20:37 1998 UTC (26 years, 3 months ago) by itohy
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -8
lines
Eliminate memory leaks.
Use xrealloc() rather than xmalloc/memcpy/free trio.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Mar 24 23:25:31 1998 UTC (26 years, 10 months ago) by sommerfe
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +14 -4
lines
Add -d option, so lint can be used safely when we're not building "in
place" (e.g., when DESTDIR is set). This causes the lint driver to
pass -nostdinc -idirafter <dir> to cpp, causing it to ignore
/usr/include and look somewhere else instead..
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Feb 22 15:40:41 1998 UTC (26 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +7 -3
lines
WARNSify
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Oct 19 19:34:56 1997 UTC (27 years, 3 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3
lines
Use S_IS*(), not S_IF*.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Dec 22 11:31:47 1996 UTC (28 years, 1 month ago) by cgd
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +10 -2
lines
* accept the file name '-' to indicate that standard input is to be
used as lint1 input. That involves having lint pass the '-' through
to the cpp which preprocesses the lint1 input, and having lint1's
scanner recognize a cpp filename "" as "{standard input}".
Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Oct 23 14:29:30 1995 UTC (29 years, 3 months ago) by jpo
Branches: MAIN
CVS tags: netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-PATCH001,
netbsd-1-2-BETA,
netbsd-1-2
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +115 -70
lines
don't rely on macros predefined by cpp
Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jul 3 21:25:23 1995 UTC (29 years, 7 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-1-base,
netbsd-1-1-RELEASE,
netbsd-1-1-PATCH001,
netbsd-1-1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3
lines
RCS id cleanup
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Jul 3 20:56:39 1995 UTC (29 years, 7 months ago) by cgd
Branches: Jochen_Pohl
CVS tags: Jochen_Pohl-950703
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0
lines
lint(1) implementation, by Jochen Pohl. named 'xlint' for a similar
reason to why 'install' is named 'xinstall'.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Jul 3 20:56:39 1995 UTC (29 years, 7 months ago) by cgd
Branches: MAIN
Initial revision
CVSweb <webmaster@jp.NetBSD.org>