elflink: Remove unused variables
authorMatt Fleming <matt.fleming@intel.com>
Wed, 4 Apr 2012 09:27:42 +0000 (10:27 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 17 Apr 2012 10:23:42 +0000 (11:23 +0100)
Reduce the number of build warnings by deleting unused variables.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/get_key.c
com32/elflink/ldlinux/kernel.c
com32/elflink/ldlinux/ldlinux.c
com32/elflink/ldlinux/readconfig.c
com32/lib/sys/module/elf_module.c
core/localboot.c

index f6e16e9..5841d02 100644 (file)
@@ -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;
index 66c4480..62eec75 100644 (file)
@@ -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);
 
index 55886be..8e15a78 100644 (file)
@@ -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 };
index d310662..70fe346 100644 (file)
@@ -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;
 
index 1f9ccfa..cc91304 100644 (file)
@@ -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;
index ff21e99..0104047 100644 (file)
@@ -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();