OSDN Git Service

Clean up some trivial build warnings
authorEric Sandeen <sandeen@redhat.com>
Sun, 6 Jul 2008 22:36:56 +0000 (18:36 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 6 Jul 2008 22:36:56 +0000 (18:36 -0400)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/probe.c
lib/ext2fs/tst_csum.c
misc/badblocks.c
misc/e2undo.c
misc/mke2fs.c

index d0d4b5d..77252a9 100644 (file)
@@ -777,11 +777,11 @@ static int probe_jfs(struct blkid_probe *probe,
 static int probe_zfs(struct blkid_probe *probe, struct blkid_magic *id,
                     unsigned char *buf)
 {
+#if 0
        char *vdev_label;
        const char *pool_name = 0;
 
        /* read nvpair data for pool name, pool GUID (complex) */
-#if 0
        blkid_set_tag(probe->dev, "LABEL", pool_name, sizeof(pool_name));
        set_uuid(probe->dev, pool_guid, 0);
 #endif
@@ -1252,9 +1252,10 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
                return dev;
 
        DBG(DEBUG_PROBE,
-           printf("need to revalidate %s (cache time %d, stat time %d,\n\t"
+           printf("need to revalidate %s (cache time %lu, stat time %lu,\n\t"
                   "time since last check %lu)\n",
-                  dev->bid_name, dev->bid_time, st.st_mtime, (unsigned long)diff));
+                  dev->bid_name, (unsigned long)dev->bid_time,
+                  (unsigned long)st.st_mtime, (unsigned long)diff));
 
        if ((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) {
                DBG(DEBUG_PROBE, printf("blkid_verify: error %s (%d) while "
index eb7377d..17ea105 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "ext2fs/ext2_fs.h"
 #include "ext2fs/ext2fs.h"
+#include "ext2fs/crc16.h"
 
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
@@ -46,7 +47,7 @@ void print_csum(const char *msg, ext2_filsys fs, dgrp_t group)
 unsigned char sb_uuid[16] = { 0x4f, 0x25, 0xe8, 0xcf, 0xe7, 0x97, 0x48, 0x23,
                              0xbe, 0xfa, 0xa7, 0x88, 0x4b, 0xae, 0xec, 0xdb };
 
-main(int argc, char **argv)
+int main(int argc, char **argv)
 {
        struct ext2_super_block param;
        errcode_t               retval;
index 15fe5af..866144e 100644 (file)
@@ -51,6 +51,7 @@ extern int optind;
 #include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
+#include <sys/time.h>
 
 #include "et/com_err.h"
 #include "ext2fs/ext2_io.h"
index bcba3b1..4bc41c9 100644 (file)
@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
                        exit(1);
                }
                blk_num = *(unsigned long *)key.dptr;
-               printf(_("Replayed transaction of size %d at location %ld\n"),
+               printf(_("Replayed transaction of size %zd at location %ld\n"),
                                                        data.dsize, blk_num);
                retval = io_channel_write_blk(channel, blk_num,
                                                -data.dsize, data.dptr);
@@ -217,4 +217,5 @@ int main(int argc, char *argv[])
        io_channel_close(channel);
        tdb_close(tdb);
 
+       return 0;
 }
index 7430d48..acb3054 100644 (file)
@@ -484,7 +484,6 @@ static void create_bad_block_inode(ext2_filsys fs, badblocks_list bb_list)
 static void reserve_inodes(ext2_filsys fs)
 {
        ext2_ino_t      i;
-       int             group;
 
        for (i = EXT2_ROOT_INO + 1; i < EXT2_FIRST_INODE(fs->super); i++)
                ext2fs_inode_alloc_stats2(fs, i, +1, 0);
@@ -927,7 +926,6 @@ static char **parse_fs_type(const char *fs_type,
        char            *cp, *t;
        const char      *size_type;
        struct str_list list;
-       int             state = 0;
        unsigned long   meg;
 
        if (init_list(&list))
@@ -1006,7 +1004,6 @@ static char *get_string_from_profile(char **fs_types, const char *opt,
                                     const char *def_val)
 {
        char *ret = 0;
-       char **cpp;
        int i;
 
        for (i=0; fs_types[i]; i++);
@@ -1049,7 +1046,7 @@ static void PRS(int argc, char *argv[])
 {
        int             b, c;
        int             size;
-       char            *tmp, *tmp2, **cpp;
+       char            *tmp, **cpp;
        int             blocksize = 0;
        int             inode_ratio = 0;
        int             inode_size = 0;
@@ -1789,7 +1786,7 @@ static int mke2fs_setup_tdb(const char *name, io_manager *io_ptr)
        printf(_("Overwriting existing filesystem; this can be undone "
                 "using the command:\n"
                 "    e2undo %s %s\n\n"), tdb_file, name);
-err_out:
+
        free(tmp_name);
        return retval;
 }