From a53f3a49e21151665ef7af86d08210de6b2ce1d6 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sun, 2 Jun 2013 15:52:41 -0500 Subject: [PATCH] Fix unused variable warnings --- appl/ftp/ftp/gssapi.c | 4 ++-- appl/kx/kxd.c | 3 +-- lib/hdb/hdb-mitdb.c | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/appl/ftp/ftp/gssapi.c b/appl/ftp/ftp/gssapi.c index b287b74a8..604d5240d 100644 --- a/appl/ftp/ftp/gssapi.c +++ b/appl/ftp/ftp/gssapi.c @@ -332,7 +332,7 @@ gss_auth(void *app_data, char *host) gss_buffer_desc input, output_token; int context_established = 0; char *p; - int n; + int n = 0; gss_channel_bindings_t bindings; struct gssapi_data *d = app_data; OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG; @@ -426,7 +426,7 @@ gss_auth(void *app_data, char *host) n = command("ADAT %s", p); free(p); } - if (GSS_ERROR(maj_stat)) { + if (GSS_ERROR(maj_stat) || n >= 4) { if (d->context_hdl != GSS_C_NO_CONTEXT) gss_delete_sec_context (&min_stat, &d->context_hdl, diff --git a/appl/kx/kxd.c b/appl/kx/kxd.c index 11f356f1c..f817e1ad3 100644 --- a/appl/kx/kxd.c +++ b/appl/kx/kxd.c @@ -403,7 +403,6 @@ close_connection(int fd, const char *message) char *p; int lsb = 0; size_t mlen; - ssize_t ret; mlen = strlen(message); if(mlen > 255) @@ -434,7 +433,7 @@ close_connection(int fd, const char *message) buf[6] = 0; buf[7] = (p - buf - 8) / 4; } - ret = write(fd, buf, p - buf); + write(fd, buf, p - buf); close(fd); } diff --git a/lib/hdb/hdb-mitdb.c b/lib/hdb/hdb-mitdb.c index ef4d94778..b196e8328 100644 --- a/lib/hdb/hdb-mitdb.c +++ b/lib/hdb/hdb-mitdb.c @@ -318,7 +318,6 @@ dup_similar_keys_in_keyset(krb5_context context, Keys *keys) krb5_error_code ret; size_t i, k; Key key; - int keyset_has_1des = 0; int keyset_has_1des_crc = 0; int keyset_has_1des_md4 = 0; int keyset_has_1des_md5 = 0; @@ -343,7 +342,6 @@ dup_similar_keys_in_keyset(krb5_context context, Keys *keys) if (k == keys->len) return 0; - keyset_has_1des = 1; ret = copy_Key(&keys->val[k], &key); if (ret) return ret;