diff options
author | marxin <mliska@suse.cz> | 2019-02-12 21:10:08 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-02-20 19:44:12 +0100 |
commit | 8d51618949d5ea8a94e0f504401e8f852a393968 (patch) | |
tree | 6c0ab829b02aba47ff3dc27b9a14d3c3a0658a3b /main/tests/test_shader_lang.cpp | |
parent | 132e2f458df7a3551a251d68afeccd0362ca6be2 (diff) |
Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
Diffstat (limited to 'main/tests/test_shader_lang.cpp')
-rw-r--r-- | main/tests/test_shader_lang.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index 8441748cc0..dcb19b7df7 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -149,11 +149,11 @@ static String dump_node_code(SL::Node *p_node, int p_level) { String header; header = _typestr(fnode->return_type) + " " + fnode->name + "("; - for (int i = 0; i < fnode->arguments.size(); i++) { + for (int j = 0; j < fnode->arguments.size(); j++) { - if (i > 0) + if (j > 0) header += ", "; - header += _prestr(fnode->arguments[i].precision) + _typestr(fnode->arguments[i].type) + " " + fnode->arguments[i].name; + header += _prestr(fnode->arguments[j].precision) + _typestr(fnode->arguments[j].type) + " " + fnode->arguments[j].name; } header += ")\n"; @@ -336,9 +336,9 @@ MainLoop *test() { print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text()); return NULL; } else { - String code; - recreate_code(&code, sl.get_shader()); - print_line("code:\n\n" + code); + String code2; + recreate_code(&code2, sl.get_shader()); + print_line("code:\n\n" + code2); } return NULL; |