--- - branch: MAIN date: Mon Jan 4 21:30:07 UTC 2021 files: - new: '1.126' old: '1.125' path: src/usr.bin/xlint/lint1/tree.c pathrev: src/usr.bin/xlint/lint1/tree.c@1.126 type: modified id: 20210104T213007Z.fb6ad031c015b2b1b231c8fbcf4296ce836e257a log: | 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. module: src subject: 'CVS commit: src/usr.bin/xlint/lint1' unixtime: '1609795807' user: rillig