On 17-02-2014 09:33:40 +0100, Stefan Manegold wrote:
Fabian,
when configured with --enable-strict, this fail to compile on my Fedora 20 desktop:
.../MonetDB/tools/merovingian/daemon/controlrunner.c: In function ‘ctl_handle_client’: .../MonetDB/tools/merovingian/daemon/controlrunner.c:387:13: error: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Werror=unused-result] chdir(q); ^ cc1: all warnings being treated as errors
I could not fix it quickly (i.e., checking and handling the return value of chdir()), as I could not quickly grasp how to do proper error/exception handling in this case ...
Would be great, if you could have a look at it.
Ignore the output. The idea is that the stuff below will also fail, and therefore emit some error, but if that happens, the world already is in such a bad shape that that most likely isn't your biggest problem. Hence a (void) probably does. If not, a fake if. (exit(0) should be fine). Fabian