From d5429c251d8559d58040a36401f09a14494aa628 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 24 Jul 2011 12:17:13 +0000 Subject: [PATCH] Clean up a number of variables set but not used warnings git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25041 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/builtin/des/f_aead.c | 3 +-- src/lib/crypto/builtin/pbkdf2.c | 3 +-- src/lib/krb5/krb/send_tgs.c | 3 --- src/lib/krb5/krb/unparse.c | 6 +----- src/lib/krb5/unicode/ucstr.c | 3 +-- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/lib/crypto/builtin/des/f_aead.c b/src/lib/crypto/builtin/des/f_aead.c index 08bd5f8b2..5d8028626 100644 --- a/src/lib/crypto/builtin/des/f_aead.c +++ b/src/lib/crypto/builtin/des/f_aead.c @@ -161,7 +161,7 @@ krb5int_des_cbc_mac(const krb5_crypto_iov *data, unsigned long num_data, const unsigned DES_INT32 *kp; const unsigned char *ip; struct iov_block_state input_pos; - unsigned char storage[MIT_DES_BLOCK_LENGTH], *block = NULL, *ptr; + unsigned char storage[MIT_DES_BLOCK_LENGTH], *ptr; IOV_BLOCK_STATE_INIT(&input_pos); input_pos.include_sign_only = 1; @@ -181,7 +181,6 @@ krb5int_des_cbc_mac(const krb5_crypto_iov *data, unsigned long num_data, if (!krb5int_c_iov_get_block_nocopy(storage, MIT_DES_BLOCK_LENGTH, data, num_data, &input_pos, &ptr)) break; - block = ptr; /* Decompose this block and xor it with the previous ciphertext. */ GET_HALF_BLOCK(temp, ptr); diff --git a/src/lib/crypto/builtin/pbkdf2.c b/src/lib/crypto/builtin/pbkdf2.c index 5c483b189..e6d13f6fb 100644 --- a/src/lib/crypto/builtin/pbkdf2.c +++ b/src/lib/crypto/builtin/pbkdf2.c @@ -150,7 +150,7 @@ krb5int_pbkdf2 (prf_fn prf, size_t hlen, krb5_key pass, const krb5_data *salt, unsigned long count, const krb5_data *output) { - int l, r, i; + int l, i; char *utmp1, *utmp2; char utmp3[20]; /* XXX length shouldn't be hardcoded! */ @@ -161,7 +161,6 @@ krb5int_pbkdf2 (prf_fn prf, size_t hlen, krb5_key pass, abort(); /* Step 2. */ l = (output->length + hlen - 1) / hlen; - r = output->length - (l - 1) * hlen; utmp1 = /*output + dklen; */ malloc(hlen); if (utmp1 == NULL) diff --git a/src/lib/krb5/krb/send_tgs.c b/src/lib/krb5/krb/send_tgs.c index 36acca5f1..1847aaa1d 100644 --- a/src/lib/krb5/krb/send_tgs.c +++ b/src/lib/krb5/krb/send_tgs.c @@ -173,7 +173,6 @@ krb5int_make_tgs_request_ext(krb5_context context, krb5_ticket *sec_ticket_arr[2]; krb5_timestamp time_now; krb5_pa_data **combined_padata = NULL; - krb5_pa_data ap_req_padata; krb5_keyblock *local_subkey = NULL; assert (subkey != NULL); @@ -249,8 +248,6 @@ krb5int_make_tgs_request_ext(krb5_context context, } else tgsreq.second_ticket = 0; - ap_req_padata.contents = NULL; - /* encode the body; then checksum it */ if ((retval = encode_krb5_kdc_req_body(&tgsreq, &scratch))) goto cleanup; diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c index 0f1d1c07e..d774b7c12 100644 --- a/src/lib/krb5/krb/unparse.c +++ b/src/lib/krb5/krb/unparse.c @@ -143,9 +143,8 @@ static krb5_error_code k5_unparse_name(krb5_context context, krb5_const_principal principal, int flags, char **name, unsigned int *size) { - char *cp, *q; + char *q; int i; - int length; krb5_int32 nelem; unsigned int totalsize = 0; char *default_realm = NULL; @@ -178,7 +177,6 @@ k5_unparse_name(krb5_context context, krb5_const_principal principal, nelem = krb5_princ_size(context, principal); for (i = 0; i < (int) nelem; i++) { - cp = krb5_princ_component(context, principal, i)->data; totalsize += component_length_quoted(krb5_princ_component(context, principal, i), flags); totalsize++; /* This is for the separator */ } @@ -211,8 +209,6 @@ k5_unparse_name(krb5_context context, krb5_const_principal principal, q = *name; for (i = 0; i < (int) nelem; i++) { - cp = krb5_princ_component(context, principal, i)->data; - length = krb5_princ_component(context, principal, i)->length; q += copy_component_quoting(q, krb5_princ_component(context, principal, diff --git a/src/lib/krb5/unicode/ucstr.c b/src/lib/krb5/unicode/ucstr.c index e75797b0b..41b5b8180 100644 --- a/src/lib/krb5/unicode/ucstr.c +++ b/src/lib/krb5/unicode/ucstr.c @@ -109,7 +109,7 @@ krb5int_utf8_normalize( krb5_data ** newdataptr, unsigned flags) { - int i, j, len, clen, outpos, ucsoutlen, outsize, last; + int i, j, len, clen, outpos, ucsoutlen, outsize; char *out = NULL, *outtmp, *s; krb5_ucs4 *ucs = NULL, *p, *ucsout = NULL; krb5_data *newdata; @@ -265,7 +265,6 @@ krb5int_utf8_normalize( if (i == len) { break; } - last = i; /* Allocate more space in out if necessary */ if (len - i >= outsize - outpos) { -- 2.26.2