mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
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.
This commit is contained in:
parent
b990fc5d3a
commit
b2316701a8
14 changed files with 29 additions and 29 deletions
|
@ -1021,7 +1021,7 @@ unsigned long long strtoull(const char* str, char** endptr, int base)
|
|||
// Serenity's PRNG is not cryptographically secure. Do not rely on this for
|
||||
// any real crypto! These functions (for now) are for compatibility.
|
||||
// TODO: In the future, rand can be made deterministic and this not.
|
||||
uint32_t arc4random()
|
||||
uint32_t arc4random(void)
|
||||
{
|
||||
char buf[4];
|
||||
syscall(SC_getrandom, buf, 4, 0);
|
||||
|
|
|
@ -41,13 +41,13 @@ __BEGIN_DECLS
|
|||
__attribute__((malloc)) __attribute__((alloc_size(1))) void* malloc(size_t);
|
||||
__attribute__((malloc)) __attribute__((alloc_size(1, 2))) void* calloc(size_t nmemb, size_t);
|
||||
size_t malloc_size(void*);
|
||||
void serenity_dump_malloc_stats();
|
||||
void serenity_dump_malloc_stats(void);
|
||||
void free(void*);
|
||||
__attribute__((alloc_size(2))) void* realloc(void* ptr, size_t);
|
||||
char* getenv(const char* name);
|
||||
int putenv(char*);
|
||||
int unsetenv(const char*);
|
||||
int clearenv();
|
||||
int clearenv(void);
|
||||
int setenv(const char* name, const char* value, int overwrite);
|
||||
int atoi(const char*);
|
||||
long atol(const char*);
|
||||
|
@ -87,7 +87,7 @@ void srand(unsigned seed);
|
|||
long int random();
|
||||
void srandom(unsigned seed);
|
||||
|
||||
uint32_t arc4random();
|
||||
uint32_t arc4random(void);
|
||||
void arc4random_buf(void*, size_t);
|
||||
uint32_t arc4random_uniform(uint32_t);
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ void closelog_r(struct syslog_data* data)
|
|||
data->maskpri = LOG_UPTO(LOG_DEBUG);
|
||||
}
|
||||
|
||||
void closelog()
|
||||
void closelog(void)
|
||||
{
|
||||
closelog_r(&global_log_data);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void vsyslog(int, const char* message, va_list);
|
|||
void vsyslog_r(int, struct syslog_data* data, const char* message, va_list);
|
||||
void openlog(const char*, int, int);
|
||||
void openlog_r(const char*, int, int, struct syslog_data*);
|
||||
void closelog();
|
||||
void closelog(void);
|
||||
void closelog_r(struct syslog_data*);
|
||||
int setlogmask(int);
|
||||
int setlogmask_r(int, struct syslog_data*);
|
||||
|
|
|
@ -444,7 +444,7 @@ void DynamicLoader::do_relocations(size_t total_tls_size)
|
|||
}
|
||||
|
||||
// Defined in <arch>/plt_trampoline.S
|
||||
extern "C" void _plt_trampoline() __attribute__((visibility("hidden")));
|
||||
extern "C" void _plt_trampoline(void) __attribute__((visibility("hidden")));
|
||||
|
||||
void DynamicLoader::setup_plt_trampoline()
|
||||
{
|
||||
|
|
|
@ -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*);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue