[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-22-gd74f235



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d74f235cfa69851083cf01e080387f5a0f50abdb

The branch, master has been updated
       via  d74f235cfa69851083cf01e080387f5a0f50abdb (commit)
      from  b1e2d32853cf569e363ef8b8f71fbdc5eda36aec (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d74f235cfa69851083cf01e080387f5a0f50abdb
Author: Bob Peterson <rpeterso redhat com>
Date:   Thu Jun 12 15:03:02 2008 -0500

    Fix gfs_fsck build warnings

-----------------------------------------------------------------------

Summary of changes:
 gfs/gfs_fsck/fs_bits.c  |   13 +++++++------
 gfs/gfs_fsck/fs_dir.c   |    4 ++--
 gfs/gfs_fsck/fs_inode.c |    2 +-
 gfs/gfs_fsck/log.c      |    8 ++++----
 gfs/gfs_fsck/main.c     |   18 ++++++++++--------
 gfs/gfs_fsck/pass2.c    |    4 ++--
 gfs/gfs_fsck/pass5.c    |    4 ++--
 gfs/gfs_fsck/rgrp.c     |    4 +++-
 gfs/gfs_fsck/super.c    |   17 +++++++++--------
 gfs/gfs_fsck/util.c     |    6 +++---
 10 files changed, 43 insertions(+), 37 deletions(-)

diff --git a/gfs/gfs_fsck/fs_bits.c b/gfs/gfs_fsck/fs_bits.c
index 9c027a2..848931f 100644
--- a/gfs/gfs_fsck/fs_bits.c
+++ b/gfs/gfs_fsck/fs_bits.c
@@ -280,8 +280,8 @@ int fs_get_bitmap(struct fsck_sb *sdp, uint64 blkno, struct fsck_rgrp *rgd){
 		return -1;
 	}
 
-	byte = (BH_DATA(rgd->rd_bh[buf]) + bits->bi_offset) +
-		(rgrp_block/GFS_NBBY - bits->bi_start);
+	byte = (unsigned char *)((BH_DATA(rgd->rd_bh[buf]) + bits->bi_offset) +
+				 (rgrp_block/GFS_NBBY - bits->bi_start));
 	bit = (rgrp_block % GFS_NBBY) * GFS_BIT_SIZE;
 
 	val = ((*byte >> bit) & GFS_BIT_MASK);
@@ -335,10 +335,11 @@ int fs_set_bitmap(struct fsck_sb *sdp, uint64 blkno, int state){
 		}
 	}
 	if (buf < rgd->rd_ri.ri_length) {
-		fs_setbit(BH_DATA(rgd->rd_bh[buf]) + bits->bi_offset,
-				  bits->bi_len,
-				  (rgrp_block - (bits->bi_start*GFS_NBBY)),
-				  state);
+		fs_setbit((unsigned char *)BH_DATA(rgd->rd_bh[buf]) +
+			  bits->bi_offset,
+			  bits->bi_len,
+			  (rgrp_block - (bits->bi_start*GFS_NBBY)),
+			  state);
 		if(write_buf(sdp, rgd->rd_bh[buf], 0)){
 			fs_rgrp_relse(rgd);
 			return -1;
diff --git a/gfs/gfs_fsck/fs_dir.c b/gfs/gfs_fsck/fs_dir.c
index 2d12cbb..399575e 100644
--- a/gfs/gfs_fsck/fs_dir.c
+++ b/gfs/gfs_fsck/fs_dir.c
@@ -12,7 +12,7 @@
 #define IS_LEAF     (1)
 #define IS_DINODE   (2)
 
-#define dir_hash(qstr) (gfs_dir_hash((qstr)->name, (qstr)->len))
+#define dir_hash(qstr) (gfs_dir_hash((char *)(qstr)->name, (qstr)->len))
 
 /* Detect directory is a stuffed inode */
 int fsck_inode_is_stuffed(struct fsck_inode *ip)
@@ -451,7 +451,7 @@ static int linked_leaf_search(struct fsck_inode *dip, identifier_t *id,
  */
 static int dir_e_search(struct fsck_inode *dip, identifier_t *id, unsigned int *type)
 {
-	osi_buf_t *bh;
+	osi_buf_t *bh = NULL;
 	struct gfs_dirent *dent;
 	int error;
 
diff --git a/gfs/gfs_fsck/fs_inode.c b/gfs/gfs_fsck/fs_inode.c
index b960025..828f092 100644
--- a/gfs/gfs_fsck/fs_inode.c
+++ b/gfs/gfs_fsck/fs_inode.c
@@ -503,7 +503,7 @@ int fs_mkdir(struct fsck_inode *dip, char *new_dir, int mode, struct fsck_inode
 	osi_filename_t name;
 	int new;
 
-	name.name = new_dir;
+	name.name = (unsigned char *)new_dir;
 	name.len = strlen(new_dir);
 	creds.cr_uid = getuid();
 	creds.cr_gid = getgid();
diff --git a/gfs/gfs_fsck/log.c b/gfs/gfs_fsck/log.c
index 94a2ca6..9c89683 100644
--- a/gfs/gfs_fsck/log.c
+++ b/gfs/gfs_fsck/log.c
@@ -104,7 +104,7 @@ int query(struct fsck_sb *sbp, const char *format, ...)
 			log_debug("Error in select() on stdin\n");
 			break;
 		}
-		read(STDIN_FILENO, &response, sizeof(char));
+		err = read(STDIN_FILENO, &response, sizeof(char));
 
 	}
  query:
@@ -114,7 +114,7 @@ int query(struct fsck_sb *sbp, const char *format, ...)
 	fflush(NULL);
 
  rescan:
-	read(STDIN_FILENO, &response, sizeof(char));
+	err = read(STDIN_FILENO, &response, sizeof(char));
 
 	if(tolower(response) == 'y') {
 		ret = 1;
@@ -124,7 +124,7 @@ int query(struct fsck_sb *sbp, const char *format, ...)
 		goto rescan;
 	} else {
 		while(response != '\n')
-			read(STDIN_FILENO, &response, sizeof(char));
+			err = read(STDIN_FILENO, &response, sizeof(char));
 		printf("Bad response, please type 'y' or 'n'.\n");
 		goto query;
 	}
@@ -135,7 +135,7 @@ int query(struct fsck_sb *sbp, const char *format, ...)
 			log_debug("Error in select() on stdin\n");
 			break;
 		}
-		read(STDIN_FILENO, &response, sizeof(char));
+		err = read(STDIN_FILENO, &response, sizeof(char));
 	}
 
 	fsck_query = FALSE;
diff --git a/gfs/gfs_fsck/main.c b/gfs/gfs_fsck/main.c
index 7e8af19..8e080ce 100644
--- a/gfs/gfs_fsck/main.c
+++ b/gfs/gfs_fsck/main.c
@@ -108,6 +108,7 @@ void interrupt(int sig)
 	struct timeval tv;
 	char response;
 	int err;
+	ssize_t amtread;
 
 	if (fsck_query) /* if we're asking them a question */
 		return;     /* ignore the interrupt signal */
@@ -123,7 +124,7 @@ void interrupt(int sig)
 			log_debug("Error in select() on stdin\n");
 			break;
 		}
-		read(STDIN_FILENO, &response, sizeof(char));
+		err = read(STDIN_FILENO, &response, sizeof(char));
 	}
 	while (TRUE) {
 		printf("\ngfs_fsck interrupted in %s:  ", pass);
@@ -136,24 +137,25 @@ void interrupt(int sig)
 
 		/* Make sure query is printed out */
 		fflush(stdout);
-		read(STDIN_FILENO, &response, sizeof(char));
+		amtread = read(STDIN_FILENO, &response, sizeof(char));
 
-		if(tolower(response) == 's') {
+		if(amtread && tolower(response) == 's') {
 			skip_this_pass = TRUE;
 			return;
 		}
-		else if (tolower(response) == 'a') {
+		else if (amtread && tolower(response) == 'a') {
 			fsck_abort = TRUE;
 			return;
 		}
-		else if (tolower(response) == 'c')
+		else if (amtread && tolower(response) == 'c')
 			return;
-        else {
+		else {
 			while(response != '\n')
-				read(STDIN_FILENO, &response, sizeof(char));
+				amtread = read(STDIN_FILENO, &response,
+					       sizeof(char));
 			printf("Bad response, please type 'c', 'a' or 's'.\n");
 			continue;
-        }
+		}
 	}
 }
 
diff --git a/gfs/gfs_fsck/pass2.c b/gfs/gfs_fsck/pass2.c
index 40085f8..450f26f 100644
--- a/gfs/gfs_fsck/pass2.c
+++ b/gfs/gfs_fsck/pass2.c
@@ -517,14 +517,14 @@ int build_rooti(struct fsck_sb *sbp)
 	relse_buf(sbp, bh);
 	sbp->rooti = ip;
 
-	if(fs_dir_add(ip, &(osi_filename_t){".", 1},
+	if(fs_dir_add(ip, &(osi_filename_t){(unsigned char *)".", 1},
 		      &(ip->i_num), ip->i_di.di_type)){
 		stack;
 		log_err("Unable to add \".\" entry to new root inode\n");
 		return -1;
 	}
 
-	if(fs_dir_add(ip, &(osi_filename_t){"..", 2},
+	if(fs_dir_add(ip, &(osi_filename_t){(unsigned char *)"..", 2},
 		      &ip->i_num, ip->i_di.di_type)){
 		stack;
 		log_err("Unable to add \"..\" entry to new root inode\n");
diff --git a/gfs/gfs_fsck/pass5.c b/gfs/gfs_fsck/pass5.c
index 3dbb72d..86c9cc3 100644
--- a/gfs/gfs_fsck/pass5.c
+++ b/gfs/gfs_fsck/pass5.c
@@ -172,9 +172,9 @@ int check_block_status(struct fsck_sb *sbp, char *buffer, unsigned int buflen,
 	struct block_query q;
 	uint64_t block;
 
-	byte = buffer;
+	byte = (unsigned char *)buffer;
 	bit = 0;
-	end = buffer + buflen;
+	end = (unsigned char *)buffer + buflen;
 
 	while(byte < end) {
 		rg_status = ((*byte >> bit) & GFS_BIT_MASK);
diff --git a/gfs/gfs_fsck/rgrp.c b/gfs/gfs_fsck/rgrp.c
index 2e67f88..d80df65 100644
--- a/gfs/gfs_fsck/rgrp.c
+++ b/gfs/gfs_fsck/rgrp.c
@@ -321,7 +321,9 @@ int fs_rgrp_recount(struct fsck_rgrp *rgd){
 		count[i] = 0;
 		for(j = 0; j < length; j++){
 			bits = &rgd->rd_bits[j];
-			count[i] += fs_bitcount(BH_DATA(rgd->rd_bh[j]) + bits->bi_offset,
+			count[i] += fs_bitcount((unsigned char *)
+						BH_DATA(rgd->rd_bh[j]) +
+						bits->bi_offset,
 						bits->bi_len, i);
 		}
 	}
diff --git a/gfs/gfs_fsck/super.c b/gfs/gfs_fsck/super.c
index 00b9170..b18228c 100644
--- a/gfs/gfs_fsck/super.c
+++ b/gfs/gfs_fsck/super.c
@@ -343,7 +343,7 @@ uint32 rgrplength2bitblocks(struct fsck_sb *sdp, uint32 length)
  * Other RGs found after that will be considered "extra."
  */
 int gfs_rgindex_rebuild(struct fsck_sb *sdp, osi_list_t *ret_list,
-						int *num_rgs)
+			unsigned int *num_rgs)
 {
 	osi_buf_t *bh; /* buffer handle */
 	uint64 subdevice_size, fs_total_size;
@@ -667,7 +667,7 @@ int gfs_rgindex_rebuild(struct fsck_sb *sdp, osi_list_t *ret_list,
 	for (subd = 0; subd < 3; subd++) { /* third subdevice is for all RGs
 										  extended past the normal 2 with
 										  gfs_grow, etc. */
-		uint64 start_block, end_block;
+		uint64 start_block, end_block = 0;
 
 		if (subd == 0) {
 			start_block = (GFS_SB_ADDR >> sdp->fsb2bb_shift) + 1;
@@ -873,7 +873,7 @@ int gfs_rgindex_rebuild(struct fsck_sb *sdp, osi_list_t *ret_list,
  *          what we think the rgindex should really look like.
  */
 int gfs_rgindex_calculate(struct fsck_sb *sdp, osi_list_t *ret_list,
-						  int *num_rgs)
+			  unsigned int *num_rgs)
 {
 	osi_buf_t *bh; /* buffer handle */
 	uint64 subdevice_size, adjust_subdevice_size, fs_total_size;
@@ -883,7 +883,7 @@ int gfs_rgindex_calculate(struct fsck_sb *sdp, osi_list_t *ret_list,
 	int error;
 	int rgi, rgs_per_subd;
 	uint64 subdevice_start;
-	uint64 addr, prev_addr, length, prev_length;
+	uint64 addr = 0, prev_addr, length = 0, prev_length;
 	uint64 blocks;
 	struct fsck_rgrp *calc_rgd;
 	char rgindex_buf_ondisk[sizeof(struct gfs_rindex)];
@@ -1006,8 +1006,9 @@ int gfs_rgindex_calculate(struct fsck_sb *sdp, osi_list_t *ret_list,
 		gfs_rindex_out(&calc_rgd->rd_ri, rgindex_buf_ondisk);
 		/* Note: rgindex_buf_ondisk is ONLY used for debug to see what the
 		   entry would look like on disk. */
-		hexdump(rgi*sizeof(struct gfs_rindex), rgindex_buf_ondisk,
-				sizeof(struct gfs_rindex));
+		hexdump(rgi*sizeof(struct gfs_rindex),
+			(unsigned char *)rgindex_buf_ondisk,
+			sizeof(struct gfs_rindex));
 	} /* for */
 	relse_buf(sdp, bh); /* release the read buffer if we have one */
 	return 0;
@@ -1083,7 +1084,7 @@ int ri_update(struct fsck_sb *sdp)
 		else if (trust_lvl == open_minded) { /* If we can't trust RG index */
 			/* Calculate our own RG index for comparison */
 			error = gfs_rgindex_calculate(sdp, &expected_rglist,
-										  &calc_rg_count);
+						      &calc_rg_count);
 			if (error) { /* If calculated RGs don't reasonably match the fs */
 				log_info("(failed--trying again at level 3)\n");
 				ri_cleanup(&sdp->rglist);
@@ -1092,7 +1093,7 @@ int ri_update(struct fsck_sb *sdp)
 		}
 		else if (trust_lvl == distrust) { /* If we can't trust RG index */
 			error = gfs_rgindex_rebuild(sdp, &expected_rglist,
-										&calc_rg_count); /* count the RGs. */
+						    &calc_rg_count); /* count the RGs. */
 			if (error) { /* If calculated RGs don't reasonably match the fs */
 				log_info("(failed--giving up)\n");
 				goto fail; /* try again, this time counting them manually */
diff --git a/gfs/gfs_fsck/util.c b/gfs/gfs_fsck/util.c
index d98731a..7a3a515 100644
--- a/gfs/gfs_fsck/util.c
+++ b/gfs/gfs_fsck/util.c
@@ -156,7 +156,7 @@ int next_rg_meta(struct fsck_rgrp *rgd, uint64 *block, int first)
   for(; i < length; i++){
     bits = &rgd->rd_bits[i];
 
-    blk = fs_bitfit(BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
+    blk = fs_bitfit((unsigned char *)BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
                     bits->bi_len, blk, GFS_BLKST_USEDMETA);
 
     if(blk != BFITNOENT){
@@ -209,10 +209,10 @@ int next_rg_meta_free(struct fsck_rgrp *rgd, uint64 *block, int first, int *mfre
   for(; i < length; i++){
     bits = &rgd->rd_bits[i];
 
-    ublk = fs_bitfit(BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
+    ublk = fs_bitfit((unsigned char *)BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
                     bits->bi_len, blk, GFS_BLKST_USEDMETA);
 
-    fblk = fs_bitfit(BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
+    fblk = fs_bitfit((unsigned char *)BH_DATA(rgd->rd_bh[i]) + bits->bi_offset,
 			     bits->bi_len, blk, GFS_BLKST_FREEMETA);
     if(ublk < fblk) {
 	    blk = ublk;


hooks/post-receive
--
Cluster Project


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]