diff --git a/scripts/generator-internals.c b/scripts/generator-internals.c index 00a15e547..5acc96971 100644 --- a/scripts/generator-internals.c +++ b/scripts/generator-internals.c @@ -42,18 +42,18 @@ static bool _open_child(struct child_process *child, const char *cmd, const char child->pid = fork(); if (child->pid < 0) { - close(pipe_fd[0]); - close(pipe_fd[1]); + (void) close(pipe_fd[0]); + (void) close(pipe_fd[1]); _error("call to fork() failed: %d\n", r); return false; } if (child->pid == 0) { // child - close(pipe_fd[0]); + (void) close(pipe_fd[0]); if (pipe_fd[1] != STDOUT_FILENO) { - dup2(pipe_fd[1], STDOUT_FILENO); - close(pipe_fd[1]); + (void) dup2(pipe_fd[1], STDOUT_FILENO); + (void) close(pipe_fd[1]); } if (execv(cmd, (char *const *) argv) < 0) @@ -62,7 +62,7 @@ static bool _open_child(struct child_process *child, const char *cmd, const char exit(1); } else { // parent - close(pipe_fd[1]); + (void) close(pipe_fd[1]); child->fp = fdopen(pipe_fd[0], "r"); if (!child->fp) { _error("call to fdopen() failed\n"); @@ -78,7 +78,7 @@ static bool _close_child(struct child_process *child) { int status; - fclose(child->fp); + (void) fclose(child->fp); while (waitpid(child->pid, &status, 0) < 0) if (errno != EINTR)