[BusyBox-cvs] CVS update of busybox (archival/bunzip2.c archival/libunarchive/decompress_bunzip2.c coreutils/uniq.c modutils/insmod.c networking/ipcalc.c util-linux/mkfs_minix.c)

Erik Andersen andersen at codepoet.org
Sat Aug 28 00:43:08 UTC 2004


    Date: Friday, August 27, 2004 @ 18:43:08
  Author: andersen
    Path: /var/cvs/busybox

Modified: archival/bunzip2.c (1.19 -> 1.20)
          archival/libunarchive/decompress_bunzip2.c (1.13 -> 1.14)
          coreutils/uniq.c (1.21 -> 1.22) modutils/insmod.c (1.123 ->
          1.124) networking/ipcalc.c (1.10 -> 1.11)
          util-linux/mkfs_minix.c (1.42 -> 1.43)

Fixup some warnings


Index: busybox/archival/bunzip2.c
diff -u busybox/archival/bunzip2.c:1.19 busybox/archival/bunzip2.c:1.20
--- busybox/archival/bunzip2.c:1.19	Sat Apr 24 23:11:13 2004
+++ busybox/archival/bunzip2.c	Fri Aug 27 18:43:05 2004
@@ -33,6 +33,8 @@
 int bunzip2_main(int argc, char **argv)
 {
 	char *compressed_name;
+	/* Note: Ignore the warning about save_name being used uninitialized.
+	 * That is not the case, but gcc has trouble working that out... */
 	char *save_name;
 	unsigned long opt;
 	int status;
Index: busybox/archival/libunarchive/decompress_bunzip2.c
diff -u busybox/archival/libunarchive/decompress_bunzip2.c:1.13 busybox/archival/libunarchive/decompress_bunzip2.c:1.14
--- busybox/archival/libunarchive/decompress_bunzip2.c:1.13	Wed Apr 14 11:51:08 2004
+++ busybox/archival/libunarchive/decompress_bunzip2.c	Fri Aug 27 18:43:05 2004
@@ -134,6 +134,8 @@
 
 static int get_next_block(bunzip_data *bd)
 {
+	/* Note: Ignore the warning about hufGroup, base and limit being used uninitialized.
+	 * They will be initialized on the fist pass of the loop. */
 	struct group_data *hufGroup;
 	int dbufCount,nextSym,dbufSize,groupCount,*base,*limit,selector,
 		i,j,k,t,runPos,symCount,symTotal,nSelectors,byteCount[256];
Index: busybox/coreutils/uniq.c
diff -u busybox/coreutils/uniq.c:1.21 busybox/coreutils/uniq.c:1.22
--- busybox/coreutils/uniq.c:1.21	Wed Mar 19 02:11:34 2003
+++ busybox/coreutils/uniq.c	Fri Aug 27 18:43:06 2004
@@ -36,7 +36,7 @@
 int uniq_main(int argc, char **argv)
 {
 	FILE *in, *out;
-	/* Note: Ignore the warning about dups and e0 possibly being uninitialized.
+	/* Note: Ignore the warning about dups and e0 being used uninitialized.
 	 * They will be initialized on the fist pass of the loop (since s0 is NULL). */
 	unsigned long dups, skip_fields, skip_chars, i;
 	const char *s0, *e0, *s1, *e1, *input_filename;
Index: busybox/modutils/insmod.c
diff -u busybox/modutils/insmod.c:1.123 busybox/modutils/insmod.c:1.124
--- busybox/modutils/insmod.c:1.123	Thu Aug 19 13:17:30 2004
+++ busybox/modutils/insmod.c	Fri Aug 27 18:43:06 2004
@@ -1973,7 +1973,7 @@
 		if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
 #ifdef CONFIG_FEATURE_CHECK_TAINTED_MODULE
 			if (gpl)
-				((char *)s->name) += 8;
+				s->name += 8;
 			else
 #endif
 				continue;
Index: busybox/networking/ipcalc.c
diff -u busybox/networking/ipcalc.c:1.10 busybox/networking/ipcalc.c:1.11
--- busybox/networking/ipcalc.c:1.10	Wed Apr 14 11:51:24 2004
+++ busybox/networking/ipcalc.c	Fri Aug 27 18:43:07 2004
@@ -68,10 +68,10 @@
 {
 	unsigned long mode;
 
-	unsigned long netmask;
-	unsigned long broadcast;
-	unsigned long network;
-	unsigned long ipaddr;
+	in_addr_t netmask;
+	in_addr_t broadcast;
+	in_addr_t network;
+	in_addr_t ipaddr;
 	struct in_addr a;
 
 #ifdef CONFIG_FEATURE_IPCALC_FANCY
Index: busybox/util-linux/mkfs_minix.c
diff -u busybox/util-linux/mkfs_minix.c:1.42 busybox/util-linux/mkfs_minix.c:1.43
--- busybox/util-linux/mkfs_minix.c:1.42	Wed Apr 14 11:51:38 2004
+++ busybox/util-linux/mkfs_minix.c	Fri Aug 27 18:43:07 2004
@@ -194,7 +194,7 @@
 
 static char *device_name = NULL;
 static int DEV = -1;
-static long BLOCKS = 0;
+static uint32_t BLOCKS = 0;
 static int check = 0;
 static int badblocks = 0;
 static int namelen = 30;		/* default (changed to 30, per Linus's
@@ -216,17 +216,17 @@
 static char boot_block_buffer[512];
 
 #define Super (*(struct minix_super_block *)super_block_buffer)
-#define INODES ((unsigned long)Super.s_ninodes)
+#define INODES (Super.s_ninodes)
 #ifdef CONFIG_FEATURE_MINIX2
-#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
+#define ZONES (version2 ? Super.s_zones : Super.s_nzones)
 #else
-#define ZONES ((unsigned long)(Super.s_nzones))
+#define ZONES (Super.s_nzones)
 #endif
-#define IMAPS ((unsigned long)Super.s_imap_blocks)
-#define ZMAPS ((unsigned long)Super.s_zmap_blocks)
-#define FIRSTZONE ((unsigned long)Super.s_firstdatazone)
-#define ZONESIZE ((unsigned long)Super.s_log_zone_size)
-#define MAXSIZE ((unsigned long)Super.s_max_size)
+#define IMAPS (Super.s_imap_blocks)
+#define ZMAPS (Super.s_zmap_blocks)
+#define FIRSTZONE (Super.s_firstdatazone)
+#define ZONESIZE (Super.s_log_zone_size)
+#define MAXSIZE (Super.s_max_size)
 #define MAGIC (Super.s_magic)
 #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS)
 
@@ -544,7 +544,13 @@
 	MAGIC = magic;
 	ZONESIZE = 0;
 	MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024;
-	ZONES = BLOCKS;
+#ifdef CONFIG_FEATURE_MINIX2
+	if (version2) {
+		Super.s_zones =  BLOCKS;
+	} else
+#endif
+		Super.s_nzones = BLOCKS;
+
 /* some magic nrs: 1 inode / 3 blocks */
 	if (req_nr_inodes == 0)
 		inodes = BLOCKS / 3;
@@ -593,11 +599,11 @@
 		unmark_inode(i);
 	inode_buffer = xmalloc(INODE_BUFFER_SIZE);
 	memset(inode_buffer, 0, INODE_BUFFER_SIZE);
-	printf("%ld inodes\n", INODES);
-	printf("%ld blocks\n", ZONES);
-	printf("Firstdatazone=%ld (%ld)\n", FIRSTZONE, NORM_FIRSTZONE);
+	printf("%ld inodes\n", (long)INODES);
+	printf("%ld blocks\n", (long)ZONES);
+	printf("Firstdatazone=%ld (%ld)\n", (long)FIRSTZONE, (long)NORM_FIRSTZONE);
 	printf("Zonesize=%d\n", BLOCK_SIZE << ZONESIZE);
-	printf("Maxsize=%ld\n\n", MAXSIZE);
+	printf("Maxsize=%ld\n\n", (long)MAXSIZE);
 }
 
 /*



More information about the busybox-cvs mailing list