Bruno Haible wrote:
Eric Blake wrote:
We could also check at configure time for AC_CHECK_SIZEOF([mode_t]), then
use the preprocessor to skip the unneeded branch altogether using the
appropriate macro from config.h.
Yes. Paul Eggert tried to avoid configure-time checks that could also be done
Bruno Haible br...@clisp.org ha escrit:
You can ignore this warning. The code is fine.
Ah, OK. Thank you. Perhaps it merits mentioning in the docs,
to avoid further reports of this kind?
Regards,
Sergey
Eric Blake e...@byu.net ha escrit:
In earlier versions of POSIX, the intent was that mode_t could
be narrower than int, and that all programmers had to use only symbolic
constants in that argument.
As a side note, on that particular architecture, mode_t is indeed
narrower than int.
Regards,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 5/20/2009 5:08 PM:
You can ignore this warning. The code is fine.
We know no way of getting rid of this warning, except by passing fewer warning
options to gcc.
We could also check at configure time for
Eric Blake wrote:
We could also check at configure time for AC_CHECK_SIZEOF([mode_t]), then
use the preprocessor to skip the unneeded branch altogether using the
appropriate macro from config.h.
Yes. Paul Eggert tried to avoid configure-time checks that could also be done
at compile-time. But
Hello,
When trying to compile open-safer.c on amd64 I get:
open-safer.c: In function 'open_safer':
open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed
through '...'
open-safer.c:46: warning: (so you should pass 'int' not 'mode_t' to
'va_arg')
open-safer.c:46: note: if this code
Sergey Poznyakoff wrote:
When trying to compile open-safer.c on amd64 I get:
open-safer.c: In function 'open_safer':
open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed through
'...'
open-safer.c:46: warning: (so you should pass 'int' not 'mode_t' to 'va_arg')
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Bruno Haible on 5/20/2009 5:08 PM:
Sergey Poznyakoff wrote:
When trying to compile open-safer.c on amd64 I get:
open-safer.c: In function 'open_safer':
open-safer.c:46: warning: 'mode_t' is promoted to 'int' when passed through
Eric Blake e...@byu.net writes:
In earlier versions of POSIX, the intent was that mode_t could
be narrower than int, and that all programmers had to use only symbolic
constants in that argument. But POSIX 2008 changed its stance by adding
these words:
The sys/stat.h header shall define the