<div dir="ltr"><div><div>Well we assign fd to be -1 above signalfd() and afterwards never read it. That's what my compiler complained about.<br><br>Thinking further i guess its the assignment thats redundant since cleanup attribute calls safe_close() that basiclly assigns fd to be -1.<br>
<br></div><div><div><div><br>I got, gcc version 4.9.0 20140604 (prerelease) (GCC)<div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-26 13:12 GMT+02:00 Zbigniew Jędrzejewski-Szmek <span dir="ltr"><<a href="mailto:zbyszek@in.waw.pl" target="_blank">zbyszek@in.waw.pl</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Thu, Jun 26, 2014 at 12:50:40PM +0200, Daniel Buch wrote:<br>
> Not sure this is an appropiate fix, feel free to leave it out<br>
><br>
> ---<br>
> src/shared/ask-password-api.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c<br>
> index 5997a03..39eab0d 100644<br>
> --- a/src/shared/ask-password-api.c<br>
> +++ b/src/shared/ask-password-api.c<br>
> @@ -344,7 +344,7 @@ int ask_password_agent(<br>
><br>
> fd = -1;<br>
><br>
> - signal_fd = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);<br>
> + signal_fd = signalfd(fd, &mask, SFD_NONBLOCK|SFD_CLOEXEC);<br>
> if (signal_fd < 0) {<br>
> log_error("signalfd(): %m");<br>
> r = -errno;<br>
</div></div>The compiler should not warn here, since fd has a cleanup function defined,<br>
which obviously looks at fd. What compiler and version is that?<br>
<br>
Zbyszek<br>
<br>
</blockquote></div><br></div></div></div></div></div></div></div>