From 24eae60940b662324e71fe350108de759dc2511a Mon Sep 17 00:00:00 2001 From: Martin Johansson Date: Mon, 11 Feb 2013 22:48:28 +0100 Subject: [PATCH] Supress warnings. Correct spelling. --- src/ban.c | 4 ++-- src/main.c | 8 ++++---- src/ssl.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ban.c b/src/ban.c index f69ccf0..ae600ff 100644 --- a/src/ban.c +++ b/src/ban.c @@ -253,8 +253,8 @@ static void Ban_saveBanFile(void) list_iterate(itr, &banlist) { ban = list_get_entry(itr, ban_t, node); SSLi_hash2hex(ban->hash, hexhash); - fprintf(file, "%s,%s,%d,%d,%d,%s,%s\n", hexhash, inet_ntoa(*((struct in_addr *)&ban->address)), - ban->mask, ban->time, ban->duration, ban->name, ban->reason); + fprintf(file, "%s,%s,%d,%ld,%d,%s,%s\n", hexhash, inet_ntoa(*((struct in_addr *)&ban->address)), + ban->mask, (long int)ban->time, ban->duration, ban->name, ban->reason); } fclose(file); banlist_changed = false; diff --git a/src/main.c b/src/main.c index 215049f..344f6bd 100644 --- a/src/main.c +++ b/src/main.c @@ -89,7 +89,7 @@ void lockfile(const char *pidfile) } snprintf(str,16,"%d\n", getpid()); - write(lfp, str, strlen(str)); /* record pid to lockfile */ + (void)write(lfp, str, strlen(str)); /* record pid to lockfile */ Log_info("PID-file: %s", pidfile); /* If uMurmur ever starts to fork()+exec(), we don't want it to @@ -195,11 +195,11 @@ void daemonize() close(i); /* close all descriptors */ i = open("/dev/null",O_RDWR); - dup(i); - dup(i); + (void)dup(i); + (void)dup(i); umask(027); /* set newly created file permissions */ - chdir("/"); + (void)chdir("/"); } diff --git a/src/ssl.c b/src/ssl.c index e7a53a2..d337e44 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -173,7 +173,7 @@ void SSLi_deinit(void) /* Create SHA1 of last certificate in the peer's chain. */ bool_t SSLi_getSHA1Hash(SSL_handle_t *ssl, uint8_t *hash) { - x509_cert *cert; + x509_cert const *cert; #ifdef POLARSSL_API_V1_2 cert = ssl_get_peer_cert(ssl); #else @@ -201,7 +201,7 @@ SSL_handle_t *SSLi_newconnection(int *fd, bool_t *SSLready) rc = ssl_init(ssl); if (rc != 0 ) - Log_fatal("Failed to initalize: %d", rc); + Log_fatal("Failed to initialize: %d", rc); ssl_set_endpoint(ssl, SSL_IS_SERVER); ssl_set_authmode(ssl, SSL_VERIFY_OPTIONAL); -- 2.30.2