installers: fix warnings
authorH. Peter Anvin <hpa@linux.intel.com>
Wed, 12 May 2010 23:06:10 +0000 (16:06 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Wed, 12 May 2010 23:06:10 +0000 (16:06 -0700)
CLean up warnings in the installers.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
extlinux/main.c
libinstaller/syslxmod.c
linux/syslinux.c

index e1d5596..dea2d19 100644 (file)
@@ -1014,6 +1014,8 @@ static const char *find_device(const char *mtab_file, dev_t dev)
                    done = true;
                    break;
                }
+       case NONE:
+           break;
        }
        if (done) {
                devname = strdup(mnt->mnt_fsname);
index 0285bb4..e18d8a6 100644 (file)
 #include "syslinux.h"
 #include "syslxint.h"
 
-#define sbs ((struct boot_sector *)syslinux_bootsect)
-
 void syslinux_make_bootsect(void *bs)
 {
     struct boot_sector *bootsect = bs;
+    const struct boot_sector *sbs =
+       (const struct boot_sector *)syslinux_bootsect;
 
     memcpy(&bootsect->bsHead, &sbs->bsHead, bsHeadLen);
     memcpy(&bootsect->bsCode, &sbs->bsCode, bsCodeLen);
@@ -234,6 +234,7 @@ int syslinux_patch(const uint32_t * sectors, int nsectors,
     int nsect = (syslinux_ldlinux_len + 511) >> 9;
     uint32_t csum;
     int i, dw, nptrs, rv;
+    struct boot_sector *sbs = (struct boot_sector *)syslinux_bootsect;
 
     if (nsectors < nsect)
        return -1;
index 0232377..0ac9de9 100644 (file)
@@ -329,7 +329,7 @@ int main(int argc, char *argv[])
     char mntname[128];
     char *ldlinux_name, **argp, *opt;
     const char *subdir = NULL;
-    uint32_t *sectors;
+    uint32_t *sectors = NULL;
     int ldlinux_sectors;
     int nsectors = 0;
     const char *errmsg;