Commit a425c0d7 authored by brettw@chromium.org's avatar brettw@chromium.org

Check for unused variables in GN.

A check for unused variables was missing for some helper functions.
The main thing that this affects is the "config" function, where
people were confused when setting deps or configs didn't work the
way they expected (because they were unused).

BUG=392026
R=dpranke@chromium.org

Review URL: https://codereview.chromium.org/399143006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284509 0039d316-1c4b-4281-b951-d872f2087c98
parent 893f78d1
......@@ -41,11 +41,6 @@ if (current_toolchain == host_toolchain) {
"source/config/$os",
"source/patched-yasm",
]
inputs = [
config_makefile,
"source/config/$os/config.h",
"source/config/$os/libyasm-stdint.h",
]
defines = [ "HAVE_CONFIG_H" ]
if (is_posix) {
cflags = [ "-std=gnu99" ]
......@@ -380,6 +375,7 @@ if (current_toolchain == host_toolchain) {
compiled_action("generate_module") {
tool = ":genmodule"
inputs = [ config_makefile ]
sources = [ "source/patched-yasm/libyasm/module.in" ]
outputs = [ "$target_gen_dir/module.c" ]
args = [
......
......@@ -739,8 +739,13 @@ Value RunFunction(Scope* scope,
block->ExecuteBlockInScope(&block_scope, err);
if (err->has_error())
return Value();
return found_function->second.executed_block_runner(
Value result = found_function->second.executed_block_runner(
function, args.list_value(), &block_scope, err);
if (!block_scope.CheckForUnusedVars(err))
return Value();
return result;
}
// Otherwise it's a no-block function.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment