summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-07-27 18:19:33 +0200
committerSebastien Helleu <flashcode@flashtux.org>2012-07-27 18:19:33 +0200
commitddf7be769a4527be7eee716164e0be12397c7a3e (patch)
tree4f1bd00b5b81f88e1976ac7aa8c31c6f3112420b /src
parent61ae7ee047053900b5227518dc62b48a5a896110 (diff)
downloadweechat-ddf7be769a4527be7eee716164e0be12397c7a3e.zip
relay: remove compiler warnings when gnutls is not enabled/found
Diffstat (limited to 'src')
-rw-r--r--src/plugins/relay/relay-client.c2
-rw-r--r--src/plugins/relay/relay-network.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/relay/relay-client.c b/src/plugins/relay/relay-client.c
index 5076fa177..5965117b1 100644
--- a/src/plugins/relay/relay-client.c
+++ b/src/plugins/relay/relay-client.c
@@ -625,7 +625,9 @@ struct t_relay_client *
relay_client_new (int sock, const char *address, struct t_relay_server *server)
{
struct t_relay_client *new_client;
+#ifdef HAVE_GNUTLS
struct t_config_option *ptr_option;
+#endif
new_client = malloc (sizeof (*new_client));
if (new_client)
diff --git a/src/plugins/relay/relay-network.c b/src/plugins/relay/relay-network.c
index 054ea4969..ca2c8d878 100644
--- a/src/plugins/relay/relay-network.c
+++ b/src/plugins/relay/relay-network.c
@@ -53,10 +53,9 @@ gnutls_dh_params_t relay_gnutls_dh_params;
void
relay_network_set_ssl_cert_key (int verbose)
{
- int ret;
-
#ifdef HAVE_GNUTLS
char *certkey_path, *certkey_path2;
+ int ret;
gnutls_certificate_free_credentials (relay_gnutls_x509_cred);
gnutls_certificate_allocate_credentials (&relay_gnutls_x509_cred);
@@ -100,6 +99,9 @@ relay_network_set_ssl_cert_key (int verbose)
}
free (certkey_path);
}
+#else
+ /* make C compiler happy */
+ (void) verbose;
#endif
}