From 9ef44574417286a94e60170c358134392eb9034b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 28 Dec 2019 12:27:40 +0000 Subject: [PATCH 1/1] Warnings: Track settings of variables Where the variable tracking does not involve &-escapes, or only involves &-escapes which work like a prefix so the processor does not have the whole variable name, we do this separately from processing. This is simpler because we can look ahead more. It also avoids disturbing the processing logic (which needs to be precisely accurate, unlike this variable tracking). Signed-off-by: Ian Jackson --- generate | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate b/generate index 03aabb0..cbc9172 100755 --- a/generate +++ b/generate @@ -245,6 +245,10 @@ sub process_input_mk ($$$$) { }; while (<$input>) { + if (m#^\s*($esc)?(\w+)\s*(?:=|\+=|\?=|:=)# || + m#^\s*(?:$esc\:macro|define)\s+($esc)?(\S+)\s#) { + $note_varref->($2,!!$1); + } if (s#^\s*$esc\:changequote\s+(\S+)\s+$##) { $$esclitr = $1; $set_esc->(); -- 2.30.2