public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: eliminate some build warnings
@ 2010-02-12 21:05 Alex Elder
  2010-02-12 21:26 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Elder @ 2010-02-12 21:05 UTC (permalink / raw)
  To: xfs

A few minor changes to get rid of some build warnings.
Also a gratuitous name change.

Signed-off-by: Alex Elder <aelder@sgi.com>

---
 db/check.c             |    4 ++--
 include/xfs_da_btree.h |    2 +-
 include/xfs_types.h    |    2 +-
 libxfs/xfs_da_btree.c  |    9 +++++----
 4 files changed, 9 insertions(+), 8 deletions(-)

Index: b/db/check.c
===================================================================
--- a/db/check.c
+++ b/db/check.c
@@ -3059,7 +3059,7 @@ process_leaf_node_dir_v2(
 	xfs_ino_t		lino;
 	int			nex;
 	xfs_ino_t		parent;
-	int			t;
+	int			t = 0;
 	int			v;
 	int			v2;
 	int			x;
@@ -3403,7 +3403,7 @@ process_quota(
 	xfs_fileoff_t	qbno;
 	char		*s = NULL;
 	int		scicb;
-	int		t;
+	int		t = 0;
 
 	switch (qtype) {
 	case IS_USER_QUOTA:
Index: b/include/xfs_da_btree.h
===================================================================
--- a/include/xfs_da_btree.h
+++ b/include/xfs_da_btree.h
@@ -251,7 +251,7 @@ xfs_daddr_t	xfs_da_reada_buf(struct xfs_
 int	xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
 					  xfs_dabuf_t *dead_buf);
 
-uint xfs_da_hashname(const uchar_t *name_string, int name_length);
+uint xfs_da_hashname(const char *name_string, int name_length);
 enum xfs_dacmp xfs_da_compname(struct xfs_da_args *args,
 				const char *name, int len);
 
Index: b/include/xfs_types.h
===================================================================
--- a/include/xfs_types.h
+++ b/include/xfs_types.h
@@ -161,7 +161,7 @@ typedef enum {
 } xfs_btnum_t;
 
 struct xfs_name {
-	const char	*name;
+	const uchar_t	*name;
 	int		len;
 };
 
Index: b/libxfs/xfs_da_btree.c
===================================================================
--- a/libxfs/xfs_da_btree.c
+++ b/libxfs/xfs_da_btree.c
@@ -1476,21 +1476,22 @@ xfs_da_path_shift(xfs_da_state_t *state,
  * This is implemented with some source-level loop unrolling.
  */
 xfs_dahash_t
-xfs_da_hashname(const uchar_t *name, int namelen)
+xfs_da_hashname(const char *name_string, int name_length)
 {
-	xfs_dahash_t hash;
+	xfs_dahash_t  hash;
+	const uchar_t *name = (const uchar_t *) name_string;
 
 	/*
 	 * Do four characters at a time as long as we can.
 	 */
-	for (hash = 0; namelen >= 4; namelen -= 4, name += 4)
+	for (hash = 0; name_length >= 4; name_length -= 4, name += 4)
 		hash = (name[0] << 21) ^ (name[1] << 14) ^ (name[2] << 7) ^
 		       (name[3] << 0) ^ rol32(hash, 7 * 4);
 
 	/*
 	 * Now do the rest of the characters.
 	 */
-	switch (namelen) {
+	switch (name_length) {
 	case 3:
 		return (name[0] << 14) ^ (name[1] << 7) ^ (name[2] << 0) ^
 		       rol32(hash, 7 * 3);

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfsprogs: eliminate some build warnings
  2010-02-12 21:05 [PATCH] xfsprogs: eliminate some build warnings Alex Elder
@ 2010-02-12 21:26 ` Christoph Hellwig
  2010-02-12 21:53   ` Alex Elder
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2010-02-12 21:26 UTC (permalink / raw)
  To: Alex Elder; +Cc: xfs

On Fri, Feb 12, 2010 at 03:05:01PM -0600, Alex Elder wrote:
> A few minor changes to get rid of some build warnings.
> Also a gratuitous name change.
> 
> Signed-off-by: Alex Elder <aelder@sgi.com>

Except for the db/check.c hunks these are files shared with the kernel,
and changes should be done to the kernel files first and then resynced.
I've started a resync of the kernel code with libxfs, but it's actually
a lot of work, mostly due to the tracing changes on the kernel side.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfsprogs: eliminate some build warnings
  2010-02-12 21:26 ` Christoph Hellwig
@ 2010-02-12 21:53   ` Alex Elder
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Elder @ 2010-02-12 21:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Fri, 2010-02-12 at 16:26 -0500, Christoph Hellwig wrote:
> 
> Except for the db/check.c hunks these are files shared with the
> kernel,
> and changes should be done to the kernel files first and then
> resynced.
> I've started a resync of the kernel code with libxfs, but it's
> actually
> a lot of work, mostly due to the tracing changes on the kernel side. 

OK, I'll re-submit without those libxfs changes shortly,
and will wait for you (or someone else) to do it right.

					-Alex

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-12 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12 21:05 [PATCH] xfsprogs: eliminate some build warnings Alex Elder
2010-02-12 21:26 ` Christoph Hellwig
2010-02-12 21:53   ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox