aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-16 02:39:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:41 -0400
commit21f3da95daed2d0f0c28cc4ef8b1103fbfb7bded (patch)
tree858c61212662b1b476bbdefe0eb8de69328a47db
parent9ac162521cd9796f44d263a61090634844c719a6 (diff)
fuse warning fix
gcc-4.3: fs/fuse/dir.c: In function 'parse_dirfile': fs/fuse/dir.c:833: warning: cast from pointer to integer of different size fs/fuse/dir.c:835: warning: cast from pointer to integer of different size [miklos@szeredi.hu: use offsetof] Acked-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/fuse.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 534744efe30d..9fbe9d258e22 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -339,7 +339,7 @@ struct fuse_dirent {
339 char name[0]; 339 char name[0];
340}; 340};
341 341
342#define FUSE_NAME_OFFSET ((unsigned) ((struct fuse_dirent *) 0)->name) 342#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
343#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) 343#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
344#define FUSE_DIRENT_SIZE(d) \ 344#define FUSE_DIRENT_SIZE(d) \
345 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 345 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)