All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH e2fsprogs] clean up some trivial build warnings
Date: Tue, 24 Jun 2008 14:14:01 -0500	[thread overview]
Message-ID: <48614779.6030600@redhat.com> (raw)

There are a few left in my build, mostly related to ignoring return
values, but here are a few trivial cleanups.

Thanks,

-Eric

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: e2fsprogs/lib/ext2fs/tst_csum.c
===================================================================
--- e2fsprogs.orig/lib/ext2fs/tst_csum.c	2008-06-24 13:54:51.000000000 -0500
+++ e2fsprogs/lib/ext2fs/tst_csum.c	2008-06-24 13:55:35.396045790 -0500
@@ -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_fi
 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: e2fsprogs/misc/badblocks.c
===================================================================
--- e2fsprogs.orig/misc/badblocks.c	2008-06-24 13:54:51.000000000 -0500
+++ e2fsprogs/misc/badblocks.c	2008-06-24 13:55:35.398045197 -0500
@@ -50,6 +50,7 @@ extern int optind;
 
 #include <sys/ioctl.h>
 #include <sys/types.h>
+#include <sys/time.h>
 
 #include "et/com_err.h"
 #include "ext2fs/ext2_io.h"
@@ -285,10 +286,10 @@ static int do_read (int dev, unsigned ch
 
 	/* Try the read */
 	if (d_flag)
-		gettimeofday(&tv1);
+		gettimeofday(&tv1, 0);
 	got = read (dev, buffer, try * block_size);
 	if (d_flag)
-		gettimeofday(&tv2);
+		gettimeofday(&tv2, 0);
 	if (got < 0)
 		got = 0;	
 	if (got & 511)
Index: e2fsprogs/misc/e2undo.c
===================================================================
--- e2fsprogs.orig/misc/e2undo.c	2008-06-24 13:54:51.000000000 -0500
+++ e2fsprogs/misc/e2undo.c	2008-06-24 13:55:35.421007176 -0500
@@ -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: e2fsprogs/misc/mke2fs.c
===================================================================
--- e2fsprogs.orig/misc/mke2fs.c	2008-06-24 13:54:51.000000000 -0500
+++ e2fsprogs/misc/mke2fs.c	2008-06-24 13:55:35.438270700 -0500
@@ -484,7 +484,6 @@ static void create_bad_block_inode(ext2_
 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 *
 	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(cha
 				     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 *
 	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;
 }
Index: e2fsprogs/lib/blkid/probe.c
===================================================================
--- e2fsprogs.orig/lib/blkid/probe.c	2008-06-24 13:55:33.655983059 -0500
+++ e2fsprogs/lib/blkid/probe.c	2008-06-24 13:59:15.574497575 -0500
@@ -777,11 +777,11 @@ static int probe_jfs(struct blkid_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
 		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 "



             reply	other threads:[~2008-06-24 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 19:14 Eric Sandeen [this message]
2008-07-06 22:37 ` [PATCH e2fsprogs] clean up some trivial build warnings Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48614779.6030600@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.