Compiling conkeror-spawn-helper.c with the the clang compiler [1] generates the following warnings:
--- % clang -O2 -o conkeror-spawn-helper conkeror-spawn-helper.c conkeror-spawn-helper.c:378:7: warning: non-void function 'main' should return a value [-Wreturn-type] return; ^ conkeror-spawn-helper.c:383:5: warning: non-void function 'main' should return a value [-Wreturn-type] return; ^ 2 diagnostics generated. --- And indeed, main() is defined as returning an int. I think those points of return can be replaced by return 0 for success (no errors). The patch below performs this replacement. With this patch applied conkeror-spawn-helper.c compiles without warnings and it seems to do its job just as well as it did when it was compiled using GCC. Cheers, Ricardo Buring [1] http://clang.llvm.org/ --- conkeror-spawn-helper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conkeror-spawn-helper.c b/conkeror-spawn-helper.c index d3ffbc4..aae5b14 100644 --- a/conkeror-spawn-helper.c +++ b/conkeror-spawn-helper.c @@ -375,11 +375,11 @@ int main(int argc, char **argv) { if (count == 0) { /* End of file received: exit without killing child */ - return; + return 0; } /* Assume msg == 0 until we support more messages */ TRY(count, kill(child_pid, SIGTERM)); - return; + return 0; } } -- _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
