svn commit: r223138 - head/sys/ufs/ffs

Tai-hwa Liang avatar at mmlab.cse.yzu.edu.tw
Thu Jun 16 11:43:18 UTC 2011


On Thu, 16 Jun 2011, Bruce Evans wrote:
> On Thu, 16 Jun 2011, Stefan Farfeleder wrote:
>
>>> Log:
>>>   Fixing compilation bustage by introducing another forward declaration.
>>> 
>>> Modified:
>>>   head/sys/ufs/ffs/ffs_extern.h
>>> 
>>> Modified: head/sys/ufs/ffs/ffs_extern.h
>>> ==============================================================================
>>> --- head/sys/ufs/ffs/ffs_extern.h	Thu Jun 16 02:27:05 2011 
>>> (r223137)
>>> +++ head/sys/ufs/ffs/ffs_extern.h	Thu Jun 16 05:26:03 2011 
>>> (r223138)
>>> @@ -33,6 +33,7 @@
>>>  #ifndef _UFS_FFS_EXTERN_H
>>>  #define	_UFS_FFS_EXTERN_H
>>> 
>>> +enum vtype;
>>>  struct buf;
>>>  struct cg;
>>>  struct fid;
>
> This might unsort the declarations (it isn't clear if the declarations
> should be sorted on tag name or keyword name).
>
>> This is not valid C code. For some reason GCC allows it (with our
>> compilation flags).
>
> This is a bug in gcc-4.2.1.  gcc-3.3.3 generates a warning for it even
> with no compilation flags, while gcc-4.2.1 doesn't generate a warning
> even with -Wall -std-c99.  It takes -pedantic to generate the warning
> with gcc-4.2.1.  TenDRA of course generates an error.
>
> It might be a style bug (like typedefing a struct) to use enums for
> anything.  They are impossible to declare opaquely.

   Does that mean we have to #include <sys/vnode.h> in userland 
makefs/ffs/ffs_bswap.c?


More information about the svn-src-head mailing list