Re: [PATCH 3/3] credential-cache--daemon: change to the socket dir on startup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 23, 2016, 21:06 UTC
- Message-ID
- <xmqqfuwjyw59.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160223071604.GC8395@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> + /* > + * We don't actually care what our cwd is; we chdir here just to > + * be a friendly daemon and avoid tying up our original cwd. > + * If this fails, it's OK to just continue without that benefit. > + */ > + chdir(dir);
I fully do agree with this comment, but my copy of gcc and system headers doesn't, unfortunately.
credential-cache--daemon.c: In function 'init_socket_directory':
credential-cache--daemon.c:245:7: error: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Werror=unused-result]
chdir(dir);
^
cc1: all warnings being treated as errors
make: *** [credential-cache--daemon.o] Error 1