[PATCH] silence build warning

Daniel Stone daniel at fooishbar.org
Tue Jan 11 07:42:37 PST 2011


Hi,

On Tue, Jan 11, 2011 at 01:45:53PM +0800, wucan wrote:
> On 01/11/2011 12:58 PM, Christian Hergert wrote:
> >Would the TEMP_FAILURE_RETRY() glibc macro be useful here?
> >
> >   http://www.gnu.org/s/libc/manual/html_node/Interrupted-Primitives.html
> Well, it should helper, but It's seem there are few codes really use
> this macro. I think we all dislike to use it , as that will lead
> codes messy, and if we really want to handle the return code, we
> should had a safe _exit_ method, else we'll stuck in the checking
> loop, in case.

Even so, putting int rc in and completely ignoring it, just to shut the
warnings up, is completely the wrong approach.  Warnings are there for a
reason; you could either cast it to void -- (void) pipe(p) -- or leave
the code as is, given that either way makes clear that the return code
is being deliberately ignored.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20110111/f1982cf9/attachment.pgp>


More information about the wayland-devel mailing list