diff options
author | Simon Rettberg | 2019-05-14 14:14:48 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-05-14 14:14:48 +0200 |
commit | 6cbc590a92a52a905b149608f63f459f0d785c1d (patch) | |
tree | 33305f0ecb19b90d1741e189339df3f20ab49f9d | |
parent | Enforce minimum delay for RPC actions if user is active (diff) | |
download | idle-daemon-6cbc590a92a52a905b149608f63f459f0d785c1d.tar.gz idle-daemon-6cbc590a92a52a905b149608f63f459f0d785c1d.tar.xz idle-daemon-6cbc590a92a52a905b149608f63f459f0d785c1d.zip |
f() -> f(void)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/rpc.c | 2 | ||||
-rw-r--r-- | src/rpc.h | 2 | ||||
-rw-r--r-- | src/util.c | 6 | ||||
-rw-r--r-- | src/util.h | 6 |
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) @@ -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 ) { @@ -3,7 +3,7 @@ #include <stdbool.h> -int rpcOpen(); +int rpcOpen( void ); void rpcHandle( int listenFd ); @@ -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 ) { @@ -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 ); |