| Age | Commit message (Collapse) | Author |
|
No functional change.
|
|
There is no need to store this information at every brace level since in
any translation unit that survives a conforming C99 compiler, an array
of unknown size is only possible once per initialization, not once per
brace level.
|
|
No binary change.
|
|
This change is a prerequisite for fixing the current bugs in handling
initializations. Part of the fix will be designation_pop, which is
costly for a singly linked list.
As a side benefit, memory management becomes simpler and needs fewer
malloc calls.
No functional change.
|
|
No functional change.
|
|
Having the code in separate functions did not add to the clarity of the
code. The additional information from the function names can be grasped
as easily from the case labels.
No functional change.
|
|
following lines) along with an incorrect return of nothing if it is
found (the following version correctly returns NULL). Should unbreak build.
|
|
|
|
(from RVP)
|
|
|
|
Seen in Postfix, smtp_proto.c.
|
|
Seen in Postfix, cleanup_strerror.c.
|
|
Needs a proper fix later, but for now, this workaround allows to run
lint on Postfix again.
|
|
The old name was too confusing.
No functional change.
|
|
The prototype declarations define the correct parameter types of these
functions so that they are no longer subject to the default argument
promotions (C11 6.5.2.2p6).
The GCC builtins are only recognized in GCC mode (-g).
|
|
Passing an arbitrary tokenizer symbol left too much freedom and
uncertainty to the caller, and 0 was a magic number in this context.
No functional change.
|
|
|
|
|
|
|
|
No functional change.
|
|
Assisted by indent(1), with manual corrections due to its many remaining
bugs.
No functional change.
|
|
No binary change, except for line numbers in assertions in suff.c.
|
|
|
|
As seen in /usr/share/misc/style.
|
|
It was only used in 2 places, and in both these places, the pointer was
never null.
|
|
Noticed by sjg.
|
|
No functional change.
|
|
None of the callers needs the HashEntry for further manipulation.
No functional change.
|
|
The documentation was wrong before since status was not restricted to
only 0 or 1.
No functional change.
|
|
Suggested by sjg, to catch more bugs like the memory leak in cond.c
1.303 from 2021-12-13.
No binary change.
|
|
The warning about unused function results would have prevented the
memory leak that was fixed in cond.c 1.303 from 2021-12-13.
|
|
Strangely, lint2 didn't notice this unnecessary export.
|
|
Prints "No applicable message"
|
|
|
|
|
|
|
|
|
|
No functional change.
|
|
|
|
This code is not reached, a line containing only the word "include" is
categorized as error before.
No functional change.
|
|
|
|
Assign pairs of variables in a consistent order, as far as possible.
Use string functions instead of raw byte access, to make the code more
human-readable. GCC 10 optimizes the code reasonably.
No functional change.
|
|
At the point where ParseDependencyOp is called, cp is guaranteed to
point to either ':' or '!'.
No functional change.
|
|
|
|
This gets rid of the magic numbers, making it possible to add another
debug flag without renumbering the others.
No functional change.
|
|
was removed long ago; only pool usage is reported.
|
|
No functional change.
|
|
$ (
echo 'VAR=value'
perl -e 'printf(".if \${VAR}\n.endif\n" x 5000);';
echo 'all:'
printf '\t%s\n' \
'@pid=$$$$; \' \
'ppid=$$(ps -o ppid -p "$$pid" | sed 1d); \' \
'ps -o vsz,rsz -p $$ppid | sed 1d'
) > leak-cond2.mk
$ make-2004.04.08.07.24.26 -r -f leak-cond.mk
2668
$ make-2004.04.13.16.06.23 -r -f leak-cond.mk
3964
$ echo $(((3964 - 2668) * 1000 / 5000))
259
This 259 is close enough to the 256 from Buf_Init in CondParser_Leaf.
|
|
The call to Buf_DoneData was useless since ownership of the buffer data
has already been passwed on to loadedfile_create and the local variable
'buf' goes out of scope after that statement.
Except for cleaning up in debug mode, there is no reason to call
Buf_DoneData and then discard the returned value.
No functional change.
|
|
Previously, each time a .for directive pushed its buffer on the input
file stack, the current filename was duplicated. This was a waste of
memory.
The name of a file is typically only used while it is read in. There is
one situation when the filename is needed for longer, which is when a
target is defined.
Since .for loops are implemented as a special form of included files,
each .for loop duplicated the current filename as well.
$ cat << EOF > for.mk
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.for i in 1 2 3 4 5 6 7 8 9 0
.endfor
.endfor
.endfor
.endfor
.endfor
.endfor
.endfor
all:
@ps -o rsz -p ${.MAKE.PID}
EOF
$ make-2021.12.13.03.55.16 -r -f for.mk
RSZ
10720
$ ./make -r -f for.mk
RSZ
1716
The difference is 8 MB, which amounts to 1 million .for loops.
|