[SV 46581] Pre-define .LOADED to avoid warnings.

* main.c (main): Pre-define .LOADED as a default-level variable.
* load.c (load_file): Set the value rather than append it.  Avoid
adding an extra initial whitespace.
* tests/scripts/features/load: Run with --warn-undefined-variables.
This commit is contained in:
Paul Smith
2016-03-13 03:02:00 -04:00
parent fd1dd7c398
commit e33f3d72bf
3 changed files with 19 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ load testload.so
POST := $(.LOADED)
all: ; @echo pre=$(PRE) post=$(POST) $(TESTLOAD)
!,
'', "pre= post=testload.so implicit\n");
'--warn-undefined-variables', "pre= post=testload.so implicit\n");
# TEST 2
# Load using an explicit function