[grilo-plugins] lua-factory: Remove unused variable in XML parser
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] lua-factory: Remove unused variable in XML parser
- Date: Mon, 16 Oct 2017 11:25:24 +0000 (UTC)
commit 8c5969e2f14fc4fec2fa3e76f2ffe962f51bdda5
Author: Bastien Nocera <hadess hadess net>
Date: Tue Oct 10 11:08:22 2017 +0200
lua-factory: Remove unused variable in XML parser
The variable assignment wasn't used, and "node" was already assigned to
either the root node, or one of its children earlier in the function.
Caught by covscan:
grilo-plugins-0.3.4/src/lua-factory/lua-library/lua-xml.c:88: assigned_pointer: Assigning value from
"is_root_node ? node : node->children" to "node" here, but that stored value is overwritten before it can be
used.
https://bugzilla.gnome.org/show_bug.cgi?id=788757
src/lua-factory/lua-library/lua-xml.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/lua-factory/lua-library/lua-xml.c b/src/lua-factory/lua-library/lua-xml.c
index 9e1f9b0..b4031d8 100644
--- a/src/lua-factory/lua-library/lua-xml.c
+++ b/src/lua-factory/lua-library/lua-xml.c
@@ -86,10 +86,9 @@ build_table_recursively (lua_State *L,
lua_createtable (L, len, 0);
for (i = 0; i < len; i++) {
node = it->data;
- node = (is_root_node) ? node : node->children;
lua_pushinteger (L, i + 1);
lua_newtable (L);
- build_table_from_xml_reader (L, doc, it->data);
+ build_table_from_xml_reader (L, doc, node);
lua_settable(L, -3);
it = it->next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]