[syslinux:elflink] elflink: Remove unused variables

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Apr 17 11:24:21 PDT 2012


Commit-ID:  461106274b69693d46734d448b7e5702fba4f229
Gitweb:     http://www.syslinux.org/commit/461106274b69693d46734d448b7e5702fba4f229
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 4 Apr 2012 10:27:42 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 17 Apr 2012 11:23:42 +0100

elflink: Remove unused variables

Reduce the number of build warnings by deleting unused variables.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/get_key.c    |    2 +-
 com32/elflink/ldlinux/kernel.c     |    1 -
 com32/elflink/ldlinux/ldlinux.c    |    1 -
 com32/elflink/ldlinux/readconfig.c |    2 --
 com32/lib/sys/module/elf_module.c  |    2 +-
 core/localboot.c                   |    1 -
 6 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/com32/elflink/ldlinux/get_key.c b/com32/elflink/ldlinux/get_key.c
index f6e16e9..5841d02 100644
--- a/com32/elflink/ldlinux/get_key.c
+++ b/com32/elflink/ldlinux/get_key.c
@@ -149,7 +149,7 @@ int get_key_decode(char *buffer, int nc, int *code)
 int get_key(FILE * f, clock_t timeout)
 {
     char buffer[KEY_MAXLEN];
-    int nc, i, rv;
+    int nc, rv;
     int another;
     char ch;
     clock_t start;
diff --git a/com32/elflink/ldlinux/kernel.c b/com32/elflink/ldlinux/kernel.c
index 66c4480..62eec75 100644
--- a/com32/elflink/ldlinux/kernel.c
+++ b/com32/elflink/ldlinux/kernel.c
@@ -23,7 +23,6 @@ int new_linux_kernel(char *okernel, char *ocmdline)
 	bool opt_quiet = false;
 	char initrd_name[256];
 	char cmdline_buf[256], *cmdline;
-	int i;
 
 	dprintf("okernel = %s, ocmdline = %s", okernel, ocmdline);
 
diff --git a/com32/elflink/ldlinux/ldlinux.c b/com32/elflink/ldlinux/ldlinux.c
index 55886be..8e15a78 100644
--- a/com32/elflink/ldlinux/ldlinux.c
+++ b/com32/elflink/ldlinux/ldlinux.c
@@ -116,7 +116,6 @@ static void enter_cmdline(void)
 
 int main(int argc, char **argv)
 {
-	com32sys_t ireg, oreg;
 	const void *adv;
 	size_t count = 0;
 	char *config_argv[2] = { NULL, NULL };
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index d310662..70fe346 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -1147,7 +1147,6 @@ do_include:
 		loadfont(KernelName);
 		refstr_put(filename);
 	} else if (looking_at(p, "kbdmap")) {
-		com32sys_t reg;
 		const char *filename;
 		char *dst = KernelName;
 		size_t len = FILENAME_MAX - 1;
@@ -1192,7 +1191,6 @@ do_include:
 
 	/* serial setting, bps, flow control */
 	else if (looking_at(p, "serial")) {
-		com32sys_t ireg;
 		uint16_t port, flow;
 		uint32_t baud;
 
diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c
index 1f9ccfa..cc91304 100644
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -467,7 +467,7 @@ static int extract_operations(struct elf_module *module) {
 
 // Loads the module into the system
 int module_load(struct elf_module *module) {
-	int res, i;
+	int res;
 	Elf32_Sym *main_sym;
 	Elf32_Ehdr elf_hdr;
 	module_ctor_t *ctor;
diff --git a/core/localboot.c b/core/localboot.c
index ff21e99..0104047 100644
--- a/core/localboot.c
+++ b/core/localboot.c
@@ -36,7 +36,6 @@ extern void local_boot16(void);
 void local_boot(int16_t ax)
 {
 	com32sys_t ireg, oreg;
-	unsigned long data;
 	int i;
 
 	vgaclearmode();


More information about the Syslinux-commits mailing list