svn commit: trunk/uClibc/libc/sysdeps/linux/common

Erik Andersen andersen at codepoet.org
Fri Sep 1 16:13:40 UTC 2006


On Fri Sep 01, 2006 at 01:23:58AM -0400, Mike Frysinger wrote:
> On Wednesday 30 August 2006 13:12, andersen at uclibc.org wrote:
> > trunk/uClibc/libc/sysdeps/linux/common/open.c
> > +int __libc_open(const char *file, int oflag, ...)
> >  {
> > -	/* gcc may warn about mode being uninitialized.
> > -	 * Just ignore that, since gcc is wrong. */
> > -	mode_t mode;
> > +	mode_t mode = 0;
> 
> why ?  as the comment says, the warning can be safely ignored and setting a 
> default value grows the object code a little
> -mike

Before checking this in, I toyed around with implementing
__syscall_open2() and __syscall_open3() and using them in each of
the two open code paths.  That did work nicely and let me keep
'mode_t mode' in the CREAT path only, but was bigger so in the
end I decided to just leave it with this.

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20060901/a8e6a7d4/attachment-0002.pgp 


More information about the uClibc mailing list