Re: [dev] [st] [PATCH] Replace close and dup with dup2.

From: Alex Pilon <alp_AT_alexpilon.ca>
Date: Wed, 22 Apr 2015 08:30:35 -0400

On Wed, Apr 22, 2015 at 09:28:10AM +0200, Roberto E. Vargas Caballero wrote:
> We don't have any opportunity of having a race condition, so there is
> no reason to use dup2 instead of dup. So I wil keep the current
> version.

Matter of style maybe. It's still annoying to have noise in the build.

    st.c:1345:3: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
                    dup(cmdfd);
                    ^~~ ~~~~~
    st.c:1345:3: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
       dup(cmdfd);
       ^

-Wall as part of CFLAGS is still in mainline, so many will see this.

Received on Wed Apr 22 2015 - 14:30:35 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 22 2015 - 14:36:35 CEST