[syslinux:elflink] elf_module: Remove unused variable

syslinux-bot for Paulo Alcantara pcacjr at zytor.com
Thu Jul 19 08:48:04 PDT 2012


Commit-ID:  0bc1bf0ffd8d8cff581631995b02dabd1d463f4b
Gitweb:     http://www.syslinux.org/commit/0bc1bf0ffd8d8cff581631995b02dabd1d463f4b
Author:     Paulo Alcantara <pcacjr at zytor.com>
AuthorDate: Thu, 5 Jul 2012 03:36:04 -0300
Committer:  Paulo Alcantara <pcacjr at zytor.com>
CommitDate: Thu, 5 Jul 2012 03:36:04 -0300

elf_module: Remove unused variable

This patch removes an unused variable and fixes the following warning:

sys/module/elf_module.c: In function ‘module_load’:
sys/module/elf_module.c:512:16: warning: variable ‘j’ set but not used
					[-Wunused-but-set-variable]

Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>

---
 com32/lib/sys/module/elf_module.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c
index d8009aa..dbb5afe 100644
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -509,15 +509,13 @@ int module_load(struct elf_module *module) {
 		 * reverse order.
 		 */
 		for (i = module->nr_needed - 1; i >= 0; i--) {
-			size_t len, j;
 			char *dep, *p;
 			char *argv[2] = { NULL, NULL };
 
 			dep = module->str_table + module->needed[i];
 
 			/* strip everything but the last component */
-			j = len = strlen(dep);
-			if (!len)
+			if (!strlen(dep))
 				continue;
 
 			if (strchr(dep, '/')) {


More information about the Syslinux-commits mailing list