diff options
author | Lenny Maiorani <lenny@colorado.edu> | 2020-12-24 08:41:54 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-26 10:10:27 +0100 |
commit | b2316701a82561cf4bcd617fe69ea7aa9b80a80a (patch) | |
tree | a8dd7a858892c8cd81328b472d2fbb1dbf0b49dc /Libraries/LibPthread | |
parent | b990fc5d3af2d48138aa2d6b6ed00a8cc78fe7a3 (diff) | |
download | serenity-b2316701a82561cf4bcd617fe69ea7aa9b80a80a.zip |
Everywhere: void arguments to C functions
Problem:
- C functions with no arguments require a single `void` in the argument list.
Solution:
- Put the `void` in the argument list of functions in C header files.
Diffstat (limited to 'Libraries/LibPthread')
-rw-r--r-- | Libraries/LibPthread/pthread.h | 6 | ||||
-rw-r--r-- | Libraries/LibPthread/pthread_once.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibPthread/pthread.h b/Libraries/LibPthread/pthread.h index f397367054..fb5c4f2dbf 100644 --- a/Libraries/LibPthread/pthread.h +++ b/Libraries/LibPthread/pthread.h @@ -67,7 +67,7 @@ int pthread_attr_setstack(pthread_attr_t* attr, void*, size_t); int pthread_attr_getstacksize(const pthread_attr_t*, size_t*); int pthread_attr_setstacksize(pthread_attr_t*, size_t); -int pthread_once(pthread_once_t*, void (*)()); +int pthread_once(pthread_once_t*, void (*)(void)); #define PTHREAD_ONCE_INIT 0 void* pthread_getspecific(pthread_key_t key); int pthread_setspecific(pthread_key_t key, const void* value); @@ -100,14 +100,14 @@ int pthread_cancel(pthread_t); int pthread_cond_destroy(pthread_cond_t*); int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, const struct timespec*); -void pthread_testcancel(); +void pthread_testcancel(void); int pthread_spin_destroy(pthread_spinlock_t*); int pthread_spin_init(pthread_spinlock_t*, int); int pthread_spin_lock(pthread_spinlock_t*); int pthread_spin_trylock(pthread_spinlock_t*); int pthread_spin_unlock(pthread_spinlock_t*); -pthread_t pthread_self(); +pthread_t pthread_self(void); int pthread_detach(pthread_t); int pthread_equal(pthread_t, pthread_t); int pthread_mutexattr_init(pthread_mutexattr_t*); diff --git a/Libraries/LibPthread/pthread_once.cpp b/Libraries/LibPthread/pthread_once.cpp index f46a67e292..141ad4acb7 100644 --- a/Libraries/LibPthread/pthread_once.cpp +++ b/Libraries/LibPthread/pthread_once.cpp @@ -37,7 +37,7 @@ enum State : i32 { PERFORMING_WITH_WAITERS, }; -int pthread_once(pthread_once_t* self, void (*callback)()) +int pthread_once(pthread_once_t* self, void (*callback)(void)) { auto& state = reinterpret_cast<Atomic<State>&>(*self); |