Re: [PATCH v3 1/2] show: Handle read and write errors

Subject: Re: [PATCH v3 1/2] show: Handle read and write errors

Date: Fri, 20 Jan 2012 15:59:34 +0200

To: Austin Clements, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Thu, 19 Jan 2012 17:29:18 -0500, Austin Clements <amdragon@MIT.EDU> wrote:
> For showing a message in raw format, rather than silently succeeding
> when a read or a write fails (or, probably, looping if a read fails),
> try to print an error message and exit with a non-zero status.
> 
> This silences one of the buildbot warnings about unused resuls.  While
> my libc lacks the declarations that trigger these warnings, this can
> be tested by adding the following to notmuch.h:
> 
> __attribute__((warn_unused_result))
> size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
> ---

+1

Tomi

Thread: