[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.
- [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/03
- [PATCH 2/3] unicodeio: depend on stdio, not ignore-value, Paul Eggert, 2013/01/03
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value,
Jim Meyering <=
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Jim Meyering, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Eric Blake, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Jim Meyering, 2013/01/04
- Re: [PATCH 1/3] fprintftime: depend on stdio, not ignore-value, Paul Eggert, 2013/01/04