]> git.cameronkatri.com Git - mandoc.git/commitdiff
Cast the return value of chdir(2) to void. We already have a comment
authorIngo Schwarze <schwarze@openbsd.org>
Wed, 26 Jul 2017 10:21:55 +0000 (10:21 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Wed, 26 Jul 2017 10:21:55 +0000 (10:21 +0000)
above explaining to human auditors why no error checking is needed
here, so it's only fair to tell the compiler, too.
Worried compiler reported by Michael <Stapelberg at debian>.

main.c

diff --git a/main.c b/main.c
index 8b600bbcefdc9143e022aa86a5b398936053569f..7f1411a6fbcccaa60e3cbbd5542566f6938c2c84 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/*     $Id: main.c,v 1.300 2017/07/20 15:26:41 schwarze Exp $ */
+/*     $Id: main.c,v 1.301 2017/07/26 10:21:55 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010-2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -478,7 +478,7 @@ main(int argc, char *argv[])
                                parse(&curp, fd, *argv);
                        else if (resp->form == FORM_SRC) {
                                /* For .so only; ignore failure. */
                                parse(&curp, fd, *argv);
                        else if (resp->form == FORM_SRC) {
                                /* For .so only; ignore failure. */
-                               chdir(conf.manpath.paths[resp->ipath]);
+                               (void)chdir(conf.manpath.paths[resp->ipath]);
                                parse(&curp, fd, resp->file);
                        } else
                                passthrough(resp->file, fd,
                                parse(&curp, fd, resp->file);
                        } else
                                passthrough(resp->file, fd,