mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:08:13 +00:00
Everywhere: Switch from (void) to [[maybe_unused]] (#4473)
Problem: - `(void)` simply casts the expression to void. This is understood to indicate that it is ignored, but this is really a compiler trick to get the compiler to not generate a warning. Solution: - Use the `[[maybe_unused]]` attribute to indicate the value is unused. Note: - Functions taking a `(void)` argument list have also been changed to `()` because this is not needed and shows up in the same grep command.
This commit is contained in:
parent
4421d98e30
commit
765936ebae
103 changed files with 219 additions and 362 deletions
|
@ -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 (*)(void));
|
||||
int pthread_once(pthread_once_t*, 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);
|
||||
void pthread_testcancel();
|
||||
|
||||
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(void);
|
||||
pthread_t pthread_self();
|
||||
int pthread_detach(pthread_t);
|
||||
int pthread_equal(pthread_t, pthread_t);
|
||||
int pthread_mutexattr_init(pthread_mutexattr_t*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue