From 3fa2e4f2a79729357db7b3d91229b8da4dd4ac4f Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 6 Oct 2008 20:04:12 +0000 Subject: [PATCH] Fix a few missing-decl, signed/unsigned warnings git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20828 dc483132-0cff-0310-8789-dd5450dbe970 --- src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c | 4 ++++ src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h | 4 ++++ src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | 2 +- src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h | 2 ++ src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c | 1 - src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c | 4 ++-- src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c | 5 +++-- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c index d7f63d0a8..06eeee47c 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c @@ -39,6 +39,10 @@ #include #include +#if defined(NEED_ISBLANK_PROTO) && !defined(isblank) +extern int isblank(); +#endif + krb5_error_code krb5_ldap_get_db_opt(char *input, char **opt, char **val) { diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h index 918c6bcf3..74bf4b17e 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h @@ -285,6 +285,10 @@ krb5_ldap_read_startup_information(krb5_context ); int has_sasl_external_mech(krb5_context, char *); +krb5_error_code +krb5_ldap_free_server_context_params(krb5_ldap_context *ldap_context); + + /* DAL functions */ diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c index 08311e89b..fdc5d10c7 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c @@ -212,7 +212,7 @@ krb5_ldap_db_init(krb5_context context, krb5_ldap_context *ldap_context) server_info = ldap_context->server_info_list[cnt]; if (server_info->server_status == NOTSET) { - int conns=0; + unsigned int conns=0; /* * Check if the server has to perform certificate-based authentication diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h index 5fc969f46..7177af601 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.h @@ -150,4 +150,6 @@ populate_krb5_db_entry(krb5_context context, krb5_const_principal princ, krb5_db_entry *entry); +int kldap_ensure_initialized (void); + #endif diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c index 7819ddd95..6e7ba33f1 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c @@ -319,7 +319,6 @@ cleanup: } krb5int_access accessor; -extern int kldap_ensure_initialized (void); static krb5_error_code asn1_encode_sequence_of_keys (krb5_key_data *key_data, krb5_int16 n_key_data, diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c index 6f8b3efd8..94d461b29 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c @@ -179,7 +179,7 @@ cleanup: return(st); } -krb5_error_code +static krb5_error_code populate_policy(krb5_context context, LDAP *ld, LDAPMessage *ent, @@ -209,7 +209,7 @@ cleanup: return st; } -krb5_error_code +static krb5_error_code krb5_ldap_get_password_policy_from_dn (krb5_context context, char *pol_name, char *pol_dn, diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c index 3ab49dbc1..fd410e2b1 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_realm.c @@ -203,7 +203,7 @@ krb5_ldap_list_realm(context, realms) goto cleanup; } - *realms = calloc(count+1, sizeof (char *)); + *realms = calloc((unsigned int) count+1, sizeof (char *)); CHECK_NULL(*realms); for (ent = ldap_first_entry(ld, result), count = 0; ent != NULL; @@ -297,7 +297,8 @@ krb5_ldap_delete_realm (context, lrealm) if ((st=krb5_get_subtree_info(&lcontext, &subtrees, &ntree)) != 0) goto cleanup; - result_arr = (LDAPMessage **) calloc(ntree+1, sizeof(LDAPMessage *)); + result_arr = (LDAPMessage **) calloc((unsigned int)ntree+1, + sizeof(LDAPMessage *)); if (result_arr == NULL) { st = ENOMEM; goto cleanup; -- 2.26.2