svn rev #25041: trunk/src/lib/ crypto/builtin/ crypto/builtin/des/ krb5/krb/ ...

epeisach@MIT.EDU epeisach at MIT.EDU
Sun Jul 24 08:17:13 EDT 2011


http://src.mit.edu/fisheye/changelog/krb5/?cs=25041
Commit By: epeisach
Log Message:
Clean up a number of variables set but not used warnings.




Changed Files:
U   trunk/src/lib/crypto/builtin/des/f_aead.c
U   trunk/src/lib/crypto/builtin/pbkdf2.c
U   trunk/src/lib/krb5/krb/send_tgs.c
U   trunk/src/lib/krb5/krb/unparse.c
U   trunk/src/lib/krb5/unicode/ucstr.c
Modified: trunk/src/lib/crypto/builtin/des/f_aead.c
===================================================================
--- trunk/src/lib/crypto/builtin/des/f_aead.c	2011-07-23 13:15:09 UTC (rev 25040)
+++ trunk/src/lib/crypto/builtin/des/f_aead.c	2011-07-24 12:17:13 UTC (rev 25041)
@@ -161,7 +161,7 @@
     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 @@
         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);

Modified: trunk/src/lib/crypto/builtin/pbkdf2.c
===================================================================
--- trunk/src/lib/crypto/builtin/pbkdf2.c	2011-07-23 13:15:09 UTC (rev 25040)
+++ trunk/src/lib/crypto/builtin/pbkdf2.c	2011-07-24 12:17:13 UTC (rev 25041)
@@ -150,7 +150,7 @@
                 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 @@
         abort();
     /* Step 2.  */
     l = (output->length + hlen - 1) / hlen;
-    r = output->length - (l - 1) * hlen;
 
     utmp1 = /*output + dklen; */ malloc(hlen);
     if (utmp1 == NULL)

Modified: trunk/src/lib/krb5/krb/send_tgs.c
===================================================================
--- trunk/src/lib/krb5/krb/send_tgs.c	2011-07-23 13:15:09 UTC (rev 25040)
+++ trunk/src/lib/krb5/krb/send_tgs.c	2011-07-24 12:17:13 UTC (rev 25041)
@@ -173,7 +173,6 @@
     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 @@
     } 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;

Modified: trunk/src/lib/krb5/krb/unparse.c
===================================================================
--- trunk/src/lib/krb5/krb/unparse.c	2011-07-23 13:15:09 UTC (rev 25040)
+++ trunk/src/lib/krb5/krb/unparse.c	2011-07-24 12:17:13 UTC (rev 25041)
@@ -143,9 +143,8 @@
 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 @@
 
     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 @@
     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,

Modified: trunk/src/lib/krb5/unicode/ucstr.c
===================================================================
--- trunk/src/lib/krb5/unicode/ucstr.c	2011-07-23 13:15:09 UTC (rev 25040)
+++ trunk/src/lib/krb5/unicode/ucstr.c	2011-07-24 12:17:13 UTC (rev 25041)
@@ -109,7 +109,7 @@
 		       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 @@
 	if (i == len) {
 	    break;
 	}
-	last = i;
 
 	/* Allocate more space in out if necessary */
 	if (len - i >= outsize - outpos) {




More information about the cvs-krb5 mailing list