summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/rpc.c2
-rw-r--r--src/rpc.h2
-rw-r--r--src/util.c6
-rw-r--r--src/util.h6
5 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 854e50a..a044dca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ project(idle-daemon C)
option(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_FLAGS "-D_GNU_SOURCE")
-set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Wextra -pedantic -Werror -Wno-multichar")
+set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -Wextra -pedantic -Werror -Wno-multichar -Wstrict-prototypes -Wmissing-prototypes -Wno-overlength-strings")
set(CMAKE_C_FLAGS_RELEASE "-O2 -Wno-multichar")
file(GLOB_RECURSE IDLEDAEMON_SOURCES src/*.c)
diff --git a/src/rpc.c b/src/rpc.c
index bfcc2c3..a563f36 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -32,7 +32,7 @@ _Static_assert( sizeof(rpcPipe) == ( sizeof(int) * 2 ), "Structsize mismatch" );
static void handleClient( int fd, struct ucred *user );
-int rpcOpen()
+int rpcOpen( void )
{
int fd = socket( AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0 );
if ( fd == -1 ) {
diff --git a/src/rpc.h b/src/rpc.h
index e6fb353..42851ac 100644
--- a/src/rpc.h
+++ b/src/rpc.h
@@ -3,7 +3,7 @@
#include <stdbool.h>
-int rpcOpen();
+int rpcOpen( void );
void rpcHandle( int listenFd );
diff --git a/src/util.c b/src/util.c
index 7e517e6..3037b30 100644
--- a/src/util.c
+++ b/src/util.c
@@ -19,7 +19,7 @@ int _testmode = 0;
// Base time for monotonic clock
static struct timespec basetime;
-time_t now()
+time_t now( void )
{
struct timespec retval;
if ( clock_gettime( CLOCK_MONOTONIC, &retval ) == -1 ) {
@@ -29,7 +29,7 @@ time_t now()
return (time_t)( retval.tv_sec - basetime.tv_sec );
}
-void init_time()
+void init_time( void )
{
if ( clock_gettime( CLOCK_MONOTONIC, &basetime ) == -1 ) {
perror( "cannot clock_gettime CLOCK_MONOTONIC" );
@@ -40,7 +40,7 @@ void init_time()
/**
* Return false = parent, true = second child
*/
-bool doublefork()
+bool doublefork( void )
{
const pid_t c1 = fork();
if ( c1 == -1 ) {
diff --git a/src/util.h b/src/util.h
index 2c3bc51..d8cf887 100644
--- a/src/util.h
+++ b/src/util.h
@@ -9,11 +9,11 @@ extern int _testmode;
struct user;
// Get monotonic clock (seconds)
-time_t now();
+time_t now( void );
-void init_time();
+void init_time( void );
-bool doublefork();
+bool doublefork( void );
bool waitRead( int fd, int ms );