[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings to be fixed
From: |
Paul Eggert |
Subject: |
Re: Warnings to be fixed |
Date: |
Thu, 16 Oct 2008 12:41:11 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> mode = (sizeof (mode_t) < sizeof (int)
> ? va_arg (ap, int)
> : va_arg (ap, mode_t)); <<<============ line 43
>
> IMHO, adding casts here just to avoid that warning would be
> counterproductive.
I agree. But would it turn your stomach to rewrite it this way?
(I assume this would silence the warning.) In general I don't like
this kind of rewrite, but in this particular case it might be OK.
if (sizeof (mode_t) < sizeof (int))
mode = va_arg (ap, int);
else
mode = va_arg (ap, mode_t);