summaryrefslogtreecommitdiff
path: root/posixos.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-05-01 15:52:58 -0400
committerPaul Smith <psmith@gnu.org>2016-05-21 16:22:25 -0400
commitba8383efd8b1fded117f2587c78c40b28fe4e016 (patch)
tree2aabe327f94e1b9a7b3ff1fb6fc6629775d543b9 /posixos.c
parent6f7fb050b4af7335de259f570b75bf6c217eb1cd (diff)
downloadmake-git-ba8383efd8b1fded117f2587c78c40b28fe4e016.tar.gz
Fixes for enhanced GCC warnings.
Move function prototypes into header files and out of .c files. Use void argument lists for functions that accept no args. Remove unused macros. Make private functions static. Align types with printf format characters.
Diffstat (limited to 'posixos.c')
-rw-r--r--posixos.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/posixos.c b/posixos.c
index 4a88b3cf..4a787e4d 100644
--- a/posixos.c
+++ b/posixos.c
@@ -45,7 +45,7 @@ static int job_rfd = -1;
static char token = '+';
static int
-make_job_rfd ()
+make_job_rfd (void)
{
#ifdef HAVE_PSELECT
/* Pretend we succeeded. */
@@ -117,7 +117,7 @@ jobserver_parse_auth (const char *auth)
}
char *
-jobserver_get_auth ()
+jobserver_get_auth (void)
{
char *auth = xmalloc ((INTSTR_LENGTH * 2) + 2);
sprintf (auth, "%d,%d", job_fds[0], job_fds[1]);
@@ -125,13 +125,13 @@ jobserver_get_auth ()
}
unsigned int
-jobserver_enabled ()
+jobserver_enabled (void)
{
return job_fds[0] >= 0;
}
void
-jobserver_clear ()
+jobserver_clear (void)
{
if (job_fds[0] >= 0)
close (job_fds[0]);
@@ -157,7 +157,7 @@ jobserver_release (int is_fatal)
}
unsigned int
-jobserver_acquire_all ()
+jobserver_acquire_all (void)
{
unsigned int tokens = 0;
@@ -210,7 +210,7 @@ jobserver_post_child (int recursive)
}
void
-jobserver_signal ()
+jobserver_signal (void)
{
if (job_rfd >= 0)
{
@@ -220,7 +220,7 @@ jobserver_signal ()
}
void
-jobserver_pre_acquire ()
+jobserver_pre_acquire (void)
{
/* Make sure we have a dup'd FD. */
if (job_rfd < 0 && job_fds[0] >= 0 && make_job_rfd () < 0)
@@ -402,7 +402,7 @@ jobserver_acquire (int timeout)
/* Create a "bad" file descriptor for stdin when parallel jobs are run. */
int
-get_bad_stdin ()
+get_bad_stdin (void)
{
static int bad_stdin = -1;