[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] Strange warnings with gcc 4.1.2



"Richard W.M. Jones" <rjones redhat com> wrote:
> This is with libvirt from CVS.  They don't look like errors to me though...
>
> ------------
> In function ‘open’,
>     inlined from ‘readFile’ at virsh.c:850:
> /usr/include/bits/fcntl2.h:45: error: call to ‘__open_too_many_args’
> declared with attribute error: open can be called either with 2 or 3
> arguments, not more
> /usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’
> declared with attribute error: open with O_CREAT in second argument
> needs 3 arguments
>
> The code in question is:
>
>     if ((fd = open(filename, O_RDONLY)) == -1) {
>
> Not a newly created file, so mode isn't needed AFAICS.

Hi Rich,

Could it be that you need an glibc update?
That should pull in headers to fix that.
With rawhide, I get no such warning.

I like that new open-with-O_CREAT-requires-mode-arg check.
It has already caught a bug in the just-released gettext-0.17.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]