diff options
| author | Eric Andersen <andersen@codepoet.org> | 2004-08-28 00:43:07 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2004-08-28 00:43:07 +0000 |
| commit | b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65 (patch) | |
| tree | cb40909520a92fd5c133d831a4d34865a15ae6f0 | |
| parent | 785001468dffa2d532b6efa5603622dd85d2bc74 (diff) | |
| download | busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.tar.gz busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.tar.bz2 busybox-w32-b225e2a76bcd2b1f3f919a09dba1e186c0d4fa65.zip | |
Fixup some warnings
| -rw-r--r-- | archival/bunzip2.c | 2 | ||||
| -rw-r--r-- | archival/libunarchive/decompress_bunzip2.c | 2 | ||||
| -rw-r--r-- | coreutils/uniq.c | 2 | ||||
| -rw-r--r-- | modutils/insmod.c | 6 | ||||
| -rw-r--r-- | networking/ipcalc.c | 8 | ||||
| -rw-r--r-- | util-linux/mkfs_minix.c | 34 |
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 @@ | |||
| 33 | int bunzip2_main(int argc, char **argv) | 33 | int bunzip2_main(int argc, char **argv) |
| 34 | { | 34 | { |
| 35 | char *compressed_name; | 35 | char *compressed_name; |
| 36 | /* Note: Ignore the warning about save_name being used uninitialized. | ||
| 37 | * That is not the case, but gcc has trouble working that out... */ | ||
| 36 | char *save_name; | 38 | char *save_name; |
| 37 | unsigned long opt; | 39 | unsigned long opt; |
| 38 | int status; | 40 | 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) | |||
| 134 | 134 | ||
| 135 | static int get_next_block(bunzip_data *bd) | 135 | static int get_next_block(bunzip_data *bd) |
| 136 | { | 136 | { |
| 137 | /* Note: Ignore the warning about hufGroup, base and limit being used uninitialized. | ||
| 138 | * They will be initialized on the fist pass of the loop. */ | ||
| 137 | struct group_data *hufGroup; | 139 | struct group_data *hufGroup; |
| 138 | int dbufCount,nextSym,dbufSize,groupCount,*base,*limit,selector, | 140 | int dbufCount,nextSym,dbufSize,groupCount,*base,*limit,selector, |
| 139 | i,j,k,t,runPos,symCount,symTotal,nSelectors,byteCount[256]; | 141 | 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"; | |||
| 36 | int uniq_main(int argc, char **argv) | 36 | int uniq_main(int argc, char **argv) |
| 37 | { | 37 | { |
| 38 | FILE *in, *out; | 38 | FILE *in, *out; |
| 39 | /* Note: Ignore the warning about dups and e0 possibly being uninitialized. | 39 | /* Note: Ignore the warning about dups and e0 being used uninitialized. |
| 40 | * They will be initialized on the fist pass of the loop (since s0 is NULL). */ | 40 | * They will be initialized on the fist pass of the loop (since s0 is NULL). */ |
| 41 | unsigned long dups, skip_fields, skip_chars, i; | 41 | unsigned long dups, skip_fields, skip_chars, i; |
| 42 | const char *s0, *e0, *s1, *e1, *input_filename; | 42 | 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); | |||
| 300 | #ifndef MODUTILS_MODULE_H | 300 | #ifndef MODUTILS_MODULE_H |
| 301 | static const int MODUTILS_MODULE_H = 1; | 301 | static const int MODUTILS_MODULE_H = 1; |
| 302 | 302 | ||
| 303 | #ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $" | 303 | #ident "$Id: insmod.c,v 1.124 2004/08/28 00:43:06 andersen Exp $" |
| 304 | 304 | ||
| 305 | /*======================================================================*/ | 305 | /*======================================================================*/ |
| 306 | /* For sizeof() which are related to the module platform and not to the | 306 | /* For sizeof() which are related to the module platform and not to the |
| @@ -458,7 +458,7 @@ int delete_module(const char *); | |||
| 458 | #ifndef MODUTILS_OBJ_H | 458 | #ifndef MODUTILS_OBJ_H |
| 459 | static const int MODUTILS_OBJ_H = 1; | 459 | static const int MODUTILS_OBJ_H = 1; |
| 460 | 460 | ||
| 461 | #ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $" | 461 | #ident "$Id: insmod.c,v 1.124 2004/08/28 00:43:06 andersen Exp $" |
| 462 | 462 | ||
| 463 | /* The relocatable object is manipulated using elfin types. */ | 463 | /* The relocatable object is manipulated using elfin types. */ |
| 464 | 464 | ||
| @@ -1973,7 +1973,7 @@ add_symbols_from( struct obj_file *f, | |||
| 1973 | if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) { | 1973 | if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) { |
| 1974 | #ifdef CONFIG_FEATURE_CHECK_TAINTED_MODULE | 1974 | #ifdef CONFIG_FEATURE_CHECK_TAINTED_MODULE |
| 1975 | if (gpl) | 1975 | if (gpl) |
| 1976 | ((char *)s->name) += 8; | 1976 | s->name += 8; |
| 1977 | else | 1977 | else |
| 1978 | #endif | 1978 | #endif |
| 1979 | continue; | 1979 | 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) | |||
| 68 | { | 68 | { |
| 69 | unsigned long mode; | 69 | unsigned long mode; |
| 70 | 70 | ||
| 71 | unsigned long netmask; | 71 | in_addr_t netmask; |
| 72 | unsigned long broadcast; | 72 | in_addr_t broadcast; |
| 73 | unsigned long network; | 73 | in_addr_t network; |
| 74 | unsigned long ipaddr; | 74 | in_addr_t ipaddr; |
| 75 | struct in_addr a; | 75 | struct in_addr a; |
| 76 | 76 | ||
| 77 | #ifdef CONFIG_FEATURE_IPCALC_FANCY | 77 | #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 { | |||
| 194 | 194 | ||
| 195 | static char *device_name = NULL; | 195 | static char *device_name = NULL; |
| 196 | static int DEV = -1; | 196 | static int DEV = -1; |
| 197 | static long BLOCKS = 0; | 197 | static uint32_t BLOCKS = 0; |
| 198 | static int check = 0; | 198 | static int check = 0; |
| 199 | static int badblocks = 0; | 199 | static int badblocks = 0; |
| 200 | static int namelen = 30; /* default (changed to 30, per Linus's | 200 | static int namelen = 30; /* default (changed to 30, per Linus's |
| @@ -216,17 +216,17 @@ static char super_block_buffer[BLOCK_SIZE]; | |||
| 216 | static char boot_block_buffer[512]; | 216 | static char boot_block_buffer[512]; |
| 217 | 217 | ||
| 218 | #define Super (*(struct minix_super_block *)super_block_buffer) | 218 | #define Super (*(struct minix_super_block *)super_block_buffer) |
| 219 | #define INODES ((unsigned long)Super.s_ninodes) | 219 | #define INODES (Super.s_ninodes) |
| 220 | #ifdef CONFIG_FEATURE_MINIX2 | 220 | #ifdef CONFIG_FEATURE_MINIX2 |
| 221 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) | 221 | #define ZONES (version2 ? Super.s_zones : Super.s_nzones) |
| 222 | #else | 222 | #else |
| 223 | #define ZONES ((unsigned long)(Super.s_nzones)) | 223 | #define ZONES (Super.s_nzones) |
| 224 | #endif | 224 | #endif |
| 225 | #define IMAPS ((unsigned long)Super.s_imap_blocks) | 225 | #define IMAPS (Super.s_imap_blocks) |
| 226 | #define ZMAPS ((unsigned long)Super.s_zmap_blocks) | 226 | #define ZMAPS (Super.s_zmap_blocks) |
| 227 | #define FIRSTZONE ((unsigned long)Super.s_firstdatazone) | 227 | #define FIRSTZONE (Super.s_firstdatazone) |
| 228 | #define ZONESIZE ((unsigned long)Super.s_log_zone_size) | 228 | #define ZONESIZE (Super.s_log_zone_size) |
| 229 | #define MAXSIZE ((unsigned long)Super.s_max_size) | 229 | #define MAXSIZE (Super.s_max_size) |
| 230 | #define MAGIC (Super.s_magic) | 230 | #define MAGIC (Super.s_magic) |
| 231 | #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) | 231 | #define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) |
| 232 | 232 | ||
| @@ -544,7 +544,13 @@ static inline void setup_tables(void) | |||
| 544 | MAGIC = magic; | 544 | MAGIC = magic; |
| 545 | ZONESIZE = 0; | 545 | ZONESIZE = 0; |
| 546 | MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024; | 546 | MAXSIZE = version2 ? 0x7fffffff : (7 + 512 + 512 * 512) * 1024; |
| 547 | ZONES = BLOCKS; | 547 | #ifdef CONFIG_FEATURE_MINIX2 |
| 548 | if (version2) { | ||
| 549 | Super.s_zones = BLOCKS; | ||
| 550 | } else | ||
| 551 | #endif | ||
| 552 | Super.s_nzones = BLOCKS; | ||
| 553 | |||
| 548 | /* some magic nrs: 1 inode / 3 blocks */ | 554 | /* some magic nrs: 1 inode / 3 blocks */ |
| 549 | if (req_nr_inodes == 0) | 555 | if (req_nr_inodes == 0) |
| 550 | inodes = BLOCKS / 3; | 556 | inodes = BLOCKS / 3; |
| @@ -593,11 +599,11 @@ static inline void setup_tables(void) | |||
| 593 | unmark_inode(i); | 599 | unmark_inode(i); |
| 594 | inode_buffer = xmalloc(INODE_BUFFER_SIZE); | 600 | inode_buffer = xmalloc(INODE_BUFFER_SIZE); |
| 595 | memset(inode_buffer, 0, INODE_BUFFER_SIZE); | 601 | memset(inode_buffer, 0, INODE_BUFFER_SIZE); |
| 596 | printf("%ld inodes\n", INODES); | 602 | printf("%ld inodes\n", (long)INODES); |
| 597 | printf("%ld blocks\n", ZONES); | 603 | printf("%ld blocks\n", (long)ZONES); |
| 598 | printf("Firstdatazone=%ld (%ld)\n", FIRSTZONE, NORM_FIRSTZONE); | 604 | printf("Firstdatazone=%ld (%ld)\n", (long)FIRSTZONE, (long)NORM_FIRSTZONE); |
| 599 | printf("Zonesize=%d\n", BLOCK_SIZE << ZONESIZE); | 605 | printf("Zonesize=%d\n", BLOCK_SIZE << ZONESIZE); |
| 600 | printf("Maxsize=%ld\n\n", MAXSIZE); | 606 | printf("Maxsize=%ld\n\n", (long)MAXSIZE); |
| 601 | } | 607 | } |
| 602 | 608 | ||
| 603 | /* | 609 | /* |
