summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--archival/bunzip2.c2
-rw-r--r--archival/libunarchive/decompress_bunzip2.c2
-rw-r--r--coreutils/uniq.c2
-rw-r--r--modutils/insmod.c6
-rw-r--r--networking/ipcalc.c8
-rw-r--r--util-linux/mkfs_minix.c34
6 files changed, 32 insertions, 22 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 5be9da517..bedd38c22 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -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;
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index 4b8ceb804..259a47776 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -134,6 +134,8 @@ static unsigned int get_bits(bunzip_data *bd, char bits_wanted)
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];
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 90686c9af..6caab5dae 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -36,7 +36,7 @@ static const char uniq_opts[] = "f:s:cdu\0\7\3\5\1\2\4";
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;
diff --git a/modutils/insmod.c b/modutils/insmod.c
index c057774b6..55a3e49be 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -300,7 +300,7 @@ extern int insmod_ng_main( int argc, char **argv);
#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $"
+#ident "$Id: insmod.c,v 1.124 2004/08/28 00:43:06 andersen Exp $"
/*======================================================================*/
/* For sizeof() which are related to the module platform and not to the
@@ -458,7 +458,7 @@ int delete_module(const char *);
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $"
+#ident "$Id: insmod.c,v 1.124 2004/08/28 00:43:06 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
@@ -1973,7 +1973,7 @@ add_symbols_from( struct obj_file *f,
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;
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index f8ca9723c..bcd272b85 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -68,10 +68,10 @@ int ipcalc_main(int argc, char **argv)
{
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
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index ffdc0b8c0..264569a94 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -194,7 +194,7 @@ struct minix_dir_entry {
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 super_block_buffer[BLOCK_SIZE];
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 @@ static inline void setup_tables(void)
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 @@ static inline void setup_tables(void)
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);
}
/*