reiserfsprogs: fix -Wpointer-sign warnings for blocksize and position

This patch fixes the following warnings:
pointer targets in passing argument 5 of ‘reiserfs_bin_search’ differ in signedness [-Wpointer-sign]
pointer targets in passing argument 2 of ‘init_rollback_file’ differ in signedness [-Wpointer-sign]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2012-10-11 15:57:26 -04:00
1 parent c21c96f7c3
commit b337b2b190
5 files changed
+14 -8

No files matched your search

+2 -1
View File
@@ -72,7 +72,8 @@ struct buffer_head * reiserfs_bread (int dev, unsigned long block, int size, int
int bwrite (struct buffer_head * bh);
void brelse (struct buffer_head * bh);
void bforget (struct buffer_head * bh);
void init_rollback_file (char * rollback_file, int *bloksize, FILE * log);
void init_rollback_file (char * rollback_file, unsigned int *blocksize,
FILE * log);
int open_rollback_file (char * rollback_file, FILE * log);
void close_rollback_file ();
void do_fsck_rollback (int fd_device, int fd_journal_device, FILE * log);
+3 -3
View File
@@ -1111,8 +1111,8 @@ struct disk_child {
struct path_element {
struct buffer_head * pe_buffer; /* Pointer to the buffer at the path in
the tree. */
int pe_position; /* Position in the tree node which is placed in the
buffer above. */
unsigned int pe_position; /* Position in the tree node which is placed
in the buffer above. */
};
@@ -1512,7 +1512,7 @@ struct buffer_info {
void padd_item (char * item, int total_length, int length);
int B_IS_IN_TREE(struct buffer_head *);
struct key * get_rkey (struct path * p_s_chk_path, reiserfs_filsys_t *);
int bin_search (void * p_v_key, void * p_v_base, int p_n_num, int p_n_width, int * p_n_pos);
int bin_search (void * p_v_key, void * p_v_base, int p_n_num, int p_n_width, unsigned int * p_n_pos);
int search_by_key (reiserfs_filsys_t *, struct key *, struct path *, int);
int search_by_entry_key (reiserfs_filsys_t *, struct key *, struct path *);
int search_for_position_by_key (reiserfs_filsys_t *, struct key *, struct path *);
+3 -1
View File
@@ -534,7 +534,9 @@ static int do_rollback = 0;
static char * rollback_data;
static int rollback_blocksize;
void init_rollback_file (char * rollback_file, int *blocksize, FILE * log) {
void init_rollback_file (char * rollback_file, unsigned int *blocksize,
FILE * log)
{
char * string;
struct stat buf;
+3 -1
View File
@@ -464,7 +464,9 @@ static int reiserfs_search_by_key_x (reiserfs_filsys_t * fs, struct key * key,
}
retval = reiserfs_bin_search (key, B_N_PKEY (bh, 0), B_NR_ITEMS (bh),
is_leaf_node (bh) ? IH_SIZE : KEY_SIZE,
&(curr->pe_position), key_length == 4 ? comp_keys : comp_keys_3);
&curr->pe_position,
key_length == 4 ?
comp_keys : comp_keys_3);
if (retval == POSITION_FOUND) {
/* key found, return if this is leaf level */
if (is_leaf_node (bh)) {
+3 -2
View File
@@ -138,7 +138,7 @@ int comp_keys (const void * p1, const void * p2)
there are no possible items, and we have not found it. With each examination we
cut the number of possible items it could be by one more than half rounded down,
or we find it. */
inline int bin_search (
int bin_search (
void * p_v_key, /* Key to search for. */
void * p_v_base, /* First item in the array. */
int p_n_num, /* Number of items in the array. */
@@ -150,7 +150,8 @@ inline int bin_search (
of item headers in a node, p_n_width
is actually the item header size not
the item size. */
int * p_n_pos /* Number of the searched for element. */
unsigned int * p_n_pos /* Number of the searched
for element. */
) {
int n_rbound, n_lbound, n_j;