Module Name: src Committed By: rillig Date: Mon Jan 4 21:30:07 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix bugs in dprint_node in debug mode (since today) The node was dereferenced before the null check. GCC 5.5 didn't warn about this obvious bug, not even with -Wall -Wextra -O2. Such a case didn't occur though in the few tests that this function was used in. The indentation for the nested nodes only needs to be set for a few lines of code, make this region as small as possible. There are nodes that use both tn_left and tn_right, even though they are not defined as binary operators. An example is CALL, for which tn_left is the address of the function name and tn_right, which are the arguments, linked via PUSH nodes. CALL is not a binary operator since it doesn't do any calculations with its arguments. To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.126 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.