]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove unused variables
authorLukas Slebodnik <lslebodn@redhat.com>
Sat, 21 Jun 2014 20:41:08 +0000 (22:41 +0200)
committerGreg Hudson <ghudson@mit.edu>
Sat, 12 Jul 2014 17:35:45 +0000 (13:35 -0400)
[ghudson@mit.edu: squashed with similar commits]

src/kadmin/server/server_stubs.c
src/lib/gssapi/krb5/util_crypt.c
src/lib/kadm5/srv/server_acl.c
src/lib/krb5/os/sendto_kdc.c
src/lib/krb5/unicode/ure/ure.c
src/plugins/kdb/db2/libdb2/hash/hash.c
src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c
src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c
src/util/support/errors.c

index 5312792a2a81dcc296437bae14057c8c5297c05c..1879dc67ef79fdb715909d60e370701d1ef15cd9 100644 (file)
@@ -39,10 +39,10 @@ gss_name_t rqst2name(struct svc_req *rqstp);
 
 static int cmp_gss_names(gss_name_t n1, gss_name_t n2)
 {
-    OM_uint32 emaj, emin;
+    OM_uint32 emin;
     int equal;
 
-    if (GSS_ERROR(emaj = gss_compare_name(&emin, n1, n2, &equal)))
+    if (GSS_ERROR(gss_compare_name(&emin, n1, n2, &equal)))
         return(0);
 
     return(equal);
index 055093cd72e8e18adf89c52e360d2048c95dc91b..0cebde12a85c8df8d429a393c4eca11e9a7e6805 100644 (file)
@@ -54,8 +54,6 @@
 #include <memory.h>
 #endif
 
-static const char kg_arcfour_l40[] = "fortybits";
-
 static krb5_error_code
 kg_copy_keys(krb5_context context, krb5_gss_ctx_id_rec *ctx, krb5_key subkey)
 {
index 044b0e9860f8d156ba8b92845f17571e09718947..a35d795dc067ca9d268382a4a5b7dd4fb16f1d23 100644 (file)
@@ -793,12 +793,11 @@ kadm5int_acl_check(kcontext, caller, opmask, principal, restrictions)
     krb5_boolean        retval;
     gss_buffer_desc     caller_buf;
     gss_OID             caller_oid;
-    OM_uint32           emaj, emin;
+    OM_uint32           emin;
     krb5_error_code     code;
     krb5_principal      caller_princ;
 
-    if (GSS_ERROR(emaj = gss_display_name(&emin, caller, &caller_buf,
-                                          &caller_oid)))
+    if (GSS_ERROR(gss_display_name(&emin, caller, &caller_buf, &caller_oid)))
         return FALSE;
 
     code = krb5_parse_name(kcontext, (char *) caller_buf.value,
index 4555321f7afbd6f4ea67374ee29eab0182dbd55e..a57283124be54d6070f0ce127a968898c6337674 100644 (file)
@@ -105,10 +105,6 @@ struct select_state {
     int nfds;
 };
 
-static const char *const state_strings[] = {
-    "INITIALIZING", "CONNECTING", "WRITING", "READING", "FAILED"
-};
-
 /* connection states */
 enum conn_states { INITIALIZING, CONNECTING, WRITING, READING, FAILED };
 struct incoming_message {
index b3fa986bdfd137c5561a7cd8c98848838d359bf8..d1cfd8af945eff6d95c6521de992249607c50885 100644 (file)
@@ -1957,7 +1957,7 @@ int
 ure_exec(ure_dfa_t dfa, int flags, ucs2_t *text, unsigned long textlen,
          unsigned long *match_start, unsigned long *match_end)
 {
-    int i, j, matched, found, skip;
+    int i, j, matched, found;
     unsigned long ms, me;
     ucs4_t c;
     ucs2_t *sp, *ep, *lp;
@@ -1983,7 +1983,7 @@ ure_exec(ure_dfa_t dfa, int flags, ucs2_t *text, unsigned long textlen,
 
     stp = dfa->states;
 
-    for (found = skip = 0; found == 0 && sp < ep; ) {
+    for (found = 0; found == 0 && sp < ep; ) {
         lp = sp;
         c = *sp++;
 
index 2343d223c09e9655efacd63c749211752ffca454..2a5b4f8ac79c5bc85f5b1f77696dc96d3b722fb8 100644 (file)
@@ -311,9 +311,7 @@ init_hash(hashp, file, info)
        const HASHINFO *info;
 {
        struct stat statbuf;
-       int32_t nelem;
 
-       nelem = 1;
        hashp->hdr.nkeys = 0;
        hashp->hdr.lorder = DB_BYTE_ORDER;
        hashp->hdr.bsize = DEF_BUCKET_SIZE;
@@ -420,11 +418,10 @@ hget_header(hashp, page_size)
        HTAB *hashp;
        u_int32_t page_size;
 {
-       u_int32_t num_copied, i;
+       u_int32_t num_copied;
        u_int8_t *hdr_dest;
 
        num_copied = 0;
-       i = 0;
 
        hdr_dest = (u_int8_t *)&hashp->hdr;
 
@@ -452,9 +449,9 @@ hput_header(hashp)
 #if DB_BYTE_ORDER == DB_LITTLE_ENDIAN
        HASHHDR whdr;
 #endif
-       u_int32_t num_copied, i;
+       u_int32_t num_copied;
 
-       num_copied = i = 0;
+       num_copied = 0;
 
        whdrp = &hashp->hdr;
 #if DB_BYTE_ORDER == DB_LITTLE_ENDIAN
index 497939d2d705a3c459de072339f97ea56a83960f..4b95278f535f9b62ccee2ac6fdcf077f498f4a3c 100644 (file)
@@ -194,12 +194,10 @@ __find_bigpair(hashp, cursorp, key, size)
        PAGE16 *pagep, *hold_pagep;
        db_pgno_t  next_pgno;
        int32_t ksize;
-       u_int16_t bytes;
        int8_t *kkey;
 
        ksize = size;
        kkey = key;
-       bytes = 0;
 
        hold_pagep = NULL;
        /* Chances are, hashp->cpage is the base page. */
index 5de04948a5b69007f06e5c0489f9c5195f9ce702..02cb05991184a58a2dd78359522f31bb0ee10482 100644 (file)
@@ -797,7 +797,6 @@ kdb5_ldap_list_policies(int argc, char *argv[])
     char *me = progname;
     krb5_error_code retval = 0;
     krb5_boolean print_usage = FALSE;
-    char *basedn = NULL;
     char **list = NULL;
     char **plist = NULL;
 
@@ -809,7 +808,7 @@ kdb5_ldap_list_policies(int argc, char *argv[])
     if ((retval = init_ldap_realm (argc, argv)))
         goto cleanup;
 
-    retval = krb5_ldap_list_policy(util_context, basedn, &list);
+    retval = krb5_ldap_list_policy(util_context, NULL, &list);
     if ((retval != 0) || (list == NULL))
         goto cleanup;
 
@@ -828,9 +827,6 @@ cleanup:
         free (list);
     }
 
-    if (basedn)
-        free (basedn);
-
     if (print_usage) {
         db_usage(LIST_POLICY);
     }
index 6c4d8bdbe4f681ba06efe300cf153ab6527816c7..70e1d59d095b45a9f43f4cbf79b5fb99a4aee2bd 100644 (file)
@@ -48,7 +48,7 @@ k5_set_error(struct errinfo *ep, long code, const char *fmt, ...)
 void
 k5_vset_error(struct errinfo *ep, long code, const char *fmt, va_list args)
 {
-    char *str, *slash;
+    char *str;
 
     k5_clear_error(ep);
     ep->code = code;