Use (void) instead of void
This commit is contained in:
		@@ -48,7 +48,7 @@ host_config *get_host_config(const char *host) {
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void client_terminate() {
 | 
			
		||||
void client_terminate(int _) {
 | 
			
		||||
    server_keep_alive = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ int cache_continue = 1;
 | 
			
		||||
magic_t magic;
 | 
			
		||||
cache_entry *cache;
 | 
			
		||||
 | 
			
		||||
int magic_init() {
 | 
			
		||||
int magic_init(void) {
 | 
			
		||||
    magic = magic_open(MAGIC_MIME);
 | 
			
		||||
    if (magic == NULL) {
 | 
			
		||||
        fprintf(stderr, ERR_STR "Unable to open magic cookie: %s" CLR_STR "\n", strerror(errno));
 | 
			
		||||
@@ -37,11 +37,11 @@ int magic_init() {
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cache_process_term() {
 | 
			
		||||
void cache_process_term(int _) {
 | 
			
		||||
    cache_continue = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cache_process() {
 | 
			
		||||
int cache_process(void) {
 | 
			
		||||
    signal(SIGINT, cache_process_term);
 | 
			
		||||
    signal(SIGTERM, cache_process_term);
 | 
			
		||||
 | 
			
		||||
@@ -221,7 +221,7 @@ int cache_process() {
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cache_init() {
 | 
			
		||||
int cache_init(void) {
 | 
			
		||||
    if (magic_init() != 0) {
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
@@ -267,7 +267,7 @@ int cache_init() {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cache_unload() {
 | 
			
		||||
int cache_unload(void) {
 | 
			
		||||
    int shm_id = shmget(CACHE_SHM_KEY, 0, 0);
 | 
			
		||||
    if (shm_id < 0) {
 | 
			
		||||
        fprintf(stderr, ERR_STR "Unable to get cache shared memory id: %s" CLR_STR "\n", strerror(errno));
 | 
			
		||||
 
 | 
			
		||||
@@ -30,15 +30,15 @@ extern cache_entry *cache;
 | 
			
		||||
 | 
			
		||||
extern int cache_continue;
 | 
			
		||||
 | 
			
		||||
int magic_init();
 | 
			
		||||
int magic_init(void);
 | 
			
		||||
 | 
			
		||||
void cache_process_term();
 | 
			
		||||
void cache_process_term(int _);
 | 
			
		||||
 | 
			
		||||
int cache_process();
 | 
			
		||||
int cache_process(void);
 | 
			
		||||
 | 
			
		||||
int cache_init();
 | 
			
		||||
int cache_init(void);
 | 
			
		||||
 | 
			
		||||
int cache_unload();
 | 
			
		||||
int cache_unload(void);
 | 
			
		||||
 | 
			
		||||
int cache_update_entry(int entry_num, const char *filename, const char *webroot);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@
 | 
			
		||||
t_config *config;
 | 
			
		||||
char geoip_dir[256], dns_server[256];
 | 
			
		||||
 | 
			
		||||
int config_init() {
 | 
			
		||||
int config_init(void) {
 | 
			
		||||
    int shm_id = shmget(CONFIG_SHM_KEY, sizeof(t_config), IPC_CREAT | IPC_EXCL | 0640);
 | 
			
		||||
    if (shm_id < 0) {
 | 
			
		||||
        fprintf(stderr, ERR_STR "Unable to create config shared memory: %s" CLR_STR "\n", strerror(errno));
 | 
			
		||||
@@ -45,7 +45,7 @@ int config_init() {
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int config_unload() {
 | 
			
		||||
int config_unload(void) {
 | 
			
		||||
    int shm_id = shmget(CONFIG_SHM_KEY, 0, 0);
 | 
			
		||||
    if (shm_id < 0) {
 | 
			
		||||
        fprintf(stderr, ERR_STR "Unable to get config shared memory id: %s" CLR_STR "\n", strerror(errno));
 | 
			
		||||
 
 | 
			
		||||
@@ -55,10 +55,10 @@ typedef struct {
 | 
			
		||||
extern t_config *config;
 | 
			
		||||
extern char geoip_dir[256], dns_server[256];
 | 
			
		||||
 | 
			
		||||
int config_init();
 | 
			
		||||
int config_init(void);
 | 
			
		||||
 | 
			
		||||
int config_load(const char *filename);
 | 
			
		||||
 | 
			
		||||
int config_unload();
 | 
			
		||||
int config_unload(void);
 | 
			
		||||
 | 
			
		||||
#endif //SESIMOS_CONFIG_H
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ sock rev_proxy;
 | 
			
		||||
char *rev_proxy_host = NULL;
 | 
			
		||||
struct timeval server_timeout = {.tv_sec = SERVER_TIMEOUT, .tv_usec = 0};
 | 
			
		||||
 | 
			
		||||
int rev_proxy_preload() {
 | 
			
		||||
int rev_proxy_preload(void) {
 | 
			
		||||
    rev_proxy.buf = NULL;
 | 
			
		||||
    rev_proxy.buf_len = 0;
 | 
			
		||||
    rev_proxy.buf_off = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
 | 
			
		||||
extern sock rev_proxy;
 | 
			
		||||
 | 
			
		||||
int rev_proxy_preload();
 | 
			
		||||
int rev_proxy_preload(void);
 | 
			
		||||
 | 
			
		||||
int rev_proxy_request_header(http_req *req, int enc);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -15,9 +15,9 @@
 | 
			
		||||
#include <signal.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int terminate = 0;
 | 
			
		||||
volatile sig_atomic_t terminate = 0;
 | 
			
		||||
 | 
			
		||||
void ws_terminate() {
 | 
			
		||||
void ws_terminate(int _) {
 | 
			
		||||
    terminate = 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ pid_t children[MAX_CHILDREN];
 | 
			
		||||
MMDB_s mmdbs[MAX_MMDB];
 | 
			
		||||
SSL_CTX *contexts[CONFIG_MAX_CERT_CONFIG];
 | 
			
		||||
 | 
			
		||||
void openssl_init() {
 | 
			
		||||
void openssl_init(void) {
 | 
			
		||||
    SSL_library_init();
 | 
			
		||||
    SSL_load_error_strings();
 | 
			
		||||
    ERR_load_BIO_strings();
 | 
			
		||||
@@ -58,7 +58,7 @@ static int ssl_servername_cb(SSL *ssl, int *ad, void *arg) {
 | 
			
		||||
    return SSL_TLSEXT_ERR_OK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void destroy() {
 | 
			
		||||
void destroy(int _) {
 | 
			
		||||
    fprintf(stderr, "\n" ERR_STR "Terminating forcefully!" CLR_STR "\n");
 | 
			
		||||
    int status = 0;
 | 
			
		||||
    int ret;
 | 
			
		||||
@@ -87,7 +87,7 @@ void destroy() {
 | 
			
		||||
    exit(2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void terminate() {
 | 
			
		||||
void terminate(int _) {
 | 
			
		||||
    fprintf(stderr, "\nTerminating gracefully...\n");
 | 
			
		||||
    active = 0;
 | 
			
		||||
 | 
			
		||||
@@ -347,7 +347,7 @@ int main(int argc, const char *argv[]) {
 | 
			
		||||
        ready_sockets_num = poll(poll_fds, NUM_SOCKETS, 1000);
 | 
			
		||||
        if (ready_sockets_num < 0) {
 | 
			
		||||
            fprintf(stderr, ERR_STR "Unable to poll sockets: %s" CLR_STR "\n", strerror(errno));
 | 
			
		||||
            terminate();
 | 
			
		||||
            terminate(0);
 | 
			
		||||
            return 1;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user