bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value


From: Jim Meyering
Subject: Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value
Date: Fri, 04 Jan 2013 09:58:37 +0100

Paul Eggert wrote:
> * lib/strftime.c [FPRINTFTIME]: Do not include ignore-value.h.
> (cpy) [FPRINTFTIME]: Use plain fwrite, not ignore_value of fwrite,
> since the stdio module arranges to silence that warning now.
> * modules/fprintftime (Depends-on): Depend on stdio, not ignore-value.
...
> -           {                                                                 
>  \
> -             /* We are ignoring the value of fwrite here, in spite of the    
>  \
> -                fact that technically, that may not be valid: the fwrite     
>  \
> -                specification in POSIX 2008 defers to that of fputc, which   
>  \
> -                is intended to be consistent with the one from ISO C,        
>  \
> -                which permits failure due to ENOMEM *without* setting the    
>  \
> -                stream's error indicator.  */                                
>  \
> -             ignore_value (fwrite ((s), _n, 1, p));                          
>  \
> -           }                                                                 
>  \
> +           fwrite (s, _n, 1, p);                                             
>  \

Hi Paul,

AFAIK, that comment is still valid, so I'd prefer to retain it.
It documents a subtle but nasty problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]