From: Guus Sliepen Date: Tue, 6 May 2014 19:40:25 +0000 (+0200) Subject: Fix warnings found by GCC 4.9. X-Git-Tag: release-1.0.24~7 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=987f2a3dd64620141d30bb8b5d5f38733497af42;p=tinc Fix warnings found by GCC 4.9. Too many arguments for format string in a few error messages. --- diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 87ba30a3..66b7d037 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -217,7 +217,7 @@ bool send_metakey(connection_t *c) { if (1 != RAND_bytes((unsigned char *)c->outkey, len)) { int err = ERR_get_error(); - logger(LOG_ERR, "Failed to generate meta key (%s)", "SEND_METAKEY", ERR_error_string(err, NULL)); + logger(LOG_ERR, "Failed to generate meta key (%s)", ERR_error_string(err, NULL)); return false; } @@ -398,7 +398,7 @@ bool send_challenge(connection_t *c) { if (1 != RAND_bytes((unsigned char *)c->hischallenge, len)) { int err = ERR_get_error(); - logger(LOG_ERR, "Failed to generate challenge (%s)", "SEND_CHALLENGE", ERR_error_string(err, NULL)); + logger(LOG_ERR, "Failed to generate challenge (%s)", ERR_error_string(err, NULL)); return false; // Do not send predictable challenges, let connection attempt fail. } diff --git a/src/protocol_key.c b/src/protocol_key.c index b55e8307..22d2ff54 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -159,7 +159,7 @@ bool send_ans_key(node_t *to) { // Create a new key if (1 != RAND_bytes((unsigned char *)to->inkey, to->inkeylength)) { int err = ERR_get_error(); - logger(LOG_ERR, "Failed to generate random for key (%s)", "SEND_ANS_KEY", ERR_error_string(err, NULL)); + logger(LOG_ERR, "Failed to generate random for key (%s)", ERR_error_string(err, NULL)); return false; // Do not send insecure keys, let connection attempt fail. }