mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Compilation error in the afs/dir.c
@ 2002-10-21 13:07 Jan Marek
  0 siblings, 0 replies; only message in thread
From: Jan Marek @ 2002-10-21 13:07 UTC (permalink / raw)
  To: linux-kernel

Hallo lkml,

I have problem with compilation of fs/afs/dir.c:

  gcc -Wp,-MD,fs/afs/.dir.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DMODULE -include include/linux/modversions.h   -DKBUILD_BASENAME=dir
-c -o fs/afs/dir.o fs/afs/dir.c
fs/afs/dir.c:75: warning: unnamed struct/union that defines no instances
fs/afs/dir.c: In function `afs_dir_iterate_block':
fs/afs/dir.c:261: union has no member named `name'
fs/afs/dir.c:293: union has no member named `name'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:297: union has no member named `unique'

Problem is here:

typedef union afs_dirent {
        struct {
                u8      valid;
                u8      unused[1];
                u16     hash_next;
                u32     vnode;
                u32     unique;
                u8      name[16];
                u8      overflow[4];    /* if any char of the name (inc
NUL) reaches here, consume
                                         * the next dirent too */
        };
        u8      extended_name[32];
} afs_dirent_t;

but I don't know, if I can change this typedef to:

typedef struct afs_dirent {
                u8      valid;
                u8      unused[1];
                u16     hash_next;
                u32     vnode;
                u32     unique;
                u8      name[16];
                u8      overflow[4];    /* if any char of the name (inc
NUL) reaches here, consume
                                         * the next dirent too */
} afs_dirent_t;

(extended_name is not used in whole dir.c...)

But is here any better way?

Sincerely
Jan Marek
-- 
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-21 13:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-21 13:07 Compilation error in the afs/dir.c Jan Marek

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

all inboxes | Powered by JetHome®