diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-05-01 10:22:47 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-05-01 10:22:47 -0400 |
commit | f86e8be3f89fe64020aa0bc0d07590aa2ed65250 (patch) | |
tree | 8f97d1373c8fd9ffbd39474f5ae38f310a1b782a /mkfs.c | |
parent | 9a34051c5183ef91674420f4326da2390d7e4be6 (diff) |
Fix uninitialized variables, and use -O so gcc starts checking for them
Gcc only sends warnings for uninitialized variables when you compile with -O,
and there were a couple of bugs sprinkled in the code. The biggest was the
alloc_start variable for mkfs, which can cause strange things to happen.
(thanks to Gabor Micsko for helping to find this)
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -308,7 +308,7 @@ int main(int ac, char **av) u64 block_count = 0; u64 dev_block_count = 0; u64 blocks[6]; - u64 alloc_start; + u64 alloc_start = 0; u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP; u64 data_profile = BTRFS_BLOCK_GROUP_RAID0; u32 leafsize = getpagesize(); |