On Thu, Apr 10, 2014 at 08:01:35PM +0200, Petter Reinholdtsen wrote:
> [Dr. Werner Fink]
> > Not that I'm aware ... AFAIK the TEMP_FAILURE_RETRY() macro can not
> > be handled this way by the compiler.  Maybe a redefinition is required
> > to do an error() if errno is not EINTR.
> 
> What do you mean by 'can not be handled this way'?  The definition in
> my /usr/include/unistd.h look like this:
> 
> # define TEMP_FAILURE_RETRY(expression) \
>   (__extension__                                                              
> \
>     ({ long int __result;                                                     
> \
>        do __result = (long int) (expression);                                 
> \
>        while (__result == -1L && errno == EINTR);                             
> \
>        __result; }))
> 

Yep, this is common ... now the return result of `expression' isn't ignored
anymore ... the question is how the inlined extension cause the warning that
its result is ignored.

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

Attachment: pgpon7UoPOKbd.pgp
Description: PGP signature

Reply via email to