vxfs warning fixes
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 16 Jul 2007 06:39:50 +0000 (23:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:41 +0000 (09:05 -0700)
gcc-4.3:

fs/freevxfs/vxfs_lookup.c: In function 'vxfs_find_entry':
fs/freevxfs/vxfs_lookup.c:139: warning: cast from pointer to integer of different size
fs/freevxfs/vxfs_lookup.c: In function 'vxfs_readdir':
fs/freevxfs/vxfs_lookup.c:294: warning: cast from pointer to integer of different size

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/freevxfs/vxfs_dir.h

index 8a4dfef1ddad7720a38343ec21ee695cd8584a09..3c96d6e6397868e28550c986a35ee6f4df5beefc 100644 (file)
@@ -80,7 +80,7 @@ struct vxfs_direct {
  *     a d_name with size len.
  */
 #define VXFS_DIRPAD            4
-#define VXFS_NAMEMIN           ((int)((struct vxfs_direct *)0)->d_name)
+#define VXFS_NAMEMIN           offsetof(struct vxfs_direct, d_name)
 #define VXFS_DIRROUND(len)     ((VXFS_DIRPAD + (len) - 1) & ~(VXFS_DIRPAD -1))
 #define VXFS_DIRLEN(len)       (VXFS_DIRROUND(VXFS_NAMEMIN + (len)))