2007-05-20 11:26:06

by Elimar Riesebieter

[permalink] [raw]
Subject: 2.6.22-rc2 built on ppc

Hi,

FYI, building the kernel modules with
gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
on my powerbook (PPC) gives:

...
fs/nfsd/nfs4acl.c: In function '_posix_to_nfsv4_one':
fs/nfsd/nfs4acl.c:227: warning: 'pas.owner' may be used uninitialized in this function
fs/nfsd/nfs4acl.c:227: warning: 'pas.group' may be used uninitialized in this function
fs/nfsd/nfs4acl.c:227: warning: 'pas.other' may be used uninitialized in this function
...

If more info is needed, please contact me via PM, as I am not
subscribed.

Thanks for your patience
Elimar

--
Never make anything simple and efficient when a way
can be found to make it complex and wonderful ;-)


Attachments:
(No filename) (0.00 B)
(No filename) (286.00 B)
(No filename) (140.00 B)
Download all attachments

2007-05-22 05:41:12

by NeilBrown

[permalink] [raw]
Subject: Re: 2.6.22-rc2 built on ppc

On Sunday May 20, [email protected] wrote:
> Hi,
>
> FYI, building the kernel modules with
> gcc (GCC) 4.1.3 20070514 (prerelease) (Debian 4.1.2-7)
> on my powerbook (PPC) gives:
>
> ...
> fs/nfsd/nfs4acl.c: In function '_posix_to_nfsv4_one':
> fs/nfsd/nfs4acl.c:227: warning: 'pas.owner' may be used uninitialized in this function
> fs/nfsd/nfs4acl.c:227: warning: 'pas.group' may be used uninitialized in this function
> fs/nfsd/nfs4acl.c:227: warning: 'pas.other' may be used uninitialized in this function
> ...

Yes....
The reality is that these fields will not be used uninitialised. This
is because every 'posix_acl' always has an ACL_USER_OBJ, and
ACL_GROUP_OBJ, and an ACL_OTHER. Isn't it Bruce ??

Maybe we could set all three to zero at the top of
summarize_posix_acl, but doing that just to get the compiler to be
quite is sometimes frowned upon.

Bruce? Do you have an opinion?

NeilBrown

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-05-22 17:20:28

by J. Bruce Fields

[permalink] [raw]
Subject: Re: 2.6.22-rc2 built on ppc

On Tue, May 22, 2007 at 03:40:50PM +1000, Neil Brown wrote:
> On Sunday May 20, [email protected] wrote:
> > fs/nfsd/nfs4acl.c: In function '_posix_to_nfsv4_one':
> > fs/nfsd/nfs4acl.c:227: warning: 'pas.owner' may be used uninitialized in this function
> > fs/nfsd/nfs4acl.c:227: warning: 'pas.group' may be used uninitialized in this function
> > fs/nfsd/nfs4acl.c:227: warning: 'pas.other' may be used uninitialized in this function
>
> Yes....
> The reality is that these fields will not be used uninitialised. This
> is because every 'posix_acl' always has an ACL_USER_OBJ, and
> ACL_GROUP_OBJ, and an ACL_OTHER. Isn't it Bruce ??

Yeah, note the:

/* We assume the acl has been verified with posix_acl_valid. */

at the top of _posix_to_nfsv4_one()--as long as that's true, the
warnings are bogus. Of course, this isn't the sort of thing you'd
expect a compiler to know. But probably it should know it can't know,
and be quiet.

> Maybe we could set all three to zero at the top of
> summarize_posix_acl, but doing that just to get the compiler to be
> quite is sometimes frowned upon.
>
> Bruce? Do you have an opinion?

You've summed it up.

I hate the compile noise too. If people really wanted the
initialization there, and didn't think it would make the code more
confusing (e.g. by implying the rest of the code should also be dealing
with the case when the ACL_USER_OBJ, ACL_GROUP, or ACL_OTHER entries
weren't there), then I'd be OK with adding it. Though I'm not
particularly interested in another flamewar about whose fault these
warnings are.

--b.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs