reiserfsprogs: fix remaining sparse warnings

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2013-08-26 19:02:19 -04:00
1 parent 20357cf349
commit 767f7b85df
25 files changed
+122 -116

No files matched your search

+12 -7
View File
@@ -738,7 +738,7 @@ int corrupt_block_header(struct block_head *blkh, unsigned int offset,
/* corrupt random number of bytes within block header started from random
offset */
void do_one_blkh_random_corrupt(struct buffer_head *bh)
static void do_one_blkh_random_corrupt(struct buffer_head *bh)
{
struct block_head *blkh;
unsigned int from;
@@ -889,7 +889,8 @@ void do_bitmap_corruption(reiserfs_filsys_t *fs)
}
/* corrupt the random number of item headers in random number of leaves */
void do_ih_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
static void do_ih_random_corrupt(reiserfs_filsys_t *fs,
unsigned long nr_leaves_cr)
{
unsigned int nr_ih_cr;
unsigned int i, j;
@@ -973,7 +974,8 @@ void do_ih_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
}
/* corrupt item */
void do_one_item_random_corrupt(struct buffer_head *bh, struct item_head *ih)
static void do_one_item_random_corrupt(struct buffer_head *bh,
struct item_head *ih)
{
unsigned int i;
unsigned int from;
@@ -1001,7 +1003,8 @@ void do_one_item_random_corrupt(struct buffer_head *bh, struct item_head *ih)
}
/* corrupt the random number of directory items in random number of leaves */
void do_dir_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
static void do_dir_random_corrupt(reiserfs_filsys_t *fs,
unsigned long nr_leaves_cr)
{
unsigned int nr_ih_cr;
unsigned int i, j;
@@ -1086,7 +1089,8 @@ void do_dir_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
}
/* corrupt the random number of stat data items in random number of leaves */
void do_sd_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
static void do_sd_random_corrupt(reiserfs_filsys_t *fs,
unsigned long nr_leaves_cr)
{
unsigned int nr_ih_cr;
unsigned int i, j;
@@ -1171,7 +1175,8 @@ void do_sd_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
}
/* corrupt the random number of indierct items in random number of leaves */
void do_ind_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
static void do_ind_random_corrupt(reiserfs_filsys_t *fs,
unsigned long nr_leaves_cr)
{
unsigned int nr_ih_cr;
unsigned int i, j;
@@ -1268,7 +1273,7 @@ void do_ind_random_corrupt(reiserfs_filsys_t *fs, unsigned long nr_leaves_cr)
corrupted
*/
void what_to_corrupt(reiserfs_filsys_t *fs, char *corruption_command)
static void what_to_corrupt(reiserfs_filsys_t *fs, char *corruption_command)
{
unsigned long nr_leaves_cr;
char code;
+7 -7
View File
@@ -238,10 +238,10 @@ static void print_one_block(reiserfs_filsys_t *fs, unsigned long block)
"bitmap" saved in that file and build the tree of blocks marked used in
that "bitmap"
*/
char *where_to_save;
char *badblocks_file;
char *corruption_list_file;
char *program_name;
static char *where_to_save;
static char *badblocks_file;
static char *corruption_list_file;
static char *program_name;
static char *parse_options(struct debugreiserfs_data *data,
int argc, char *argv[])
@@ -583,7 +583,7 @@ static void callback_badblock_print(reiserfs_filsys_t *fs,
pathrelse(badblock_path);
}
void extract_badblock_list()
static void extract_badblock_list(void)
{
FILE *fd;
@@ -610,7 +610,7 @@ static int str2int(char *str, int *res)
return 1;
}
void do_corrupt_blocks(reiserfs_filsys_t *fs)
static void do_corrupt_blocks(reiserfs_filsys_t *fs)
{
char *line;
FILE *fd;
@@ -647,7 +647,7 @@ void do_corrupt_blocks(reiserfs_filsys_t *fs)
return;
}
void debugreiserfs_zero_reiserfs(reiserfs_filsys_t *fs)
static void debugreiserfs_zero_reiserfs(reiserfs_filsys_t *fs)
{
unsigned long done, total, i;
struct buffer_head *bh;