From fece03d446d95afdbcc1894fb67ee6942887b2f2 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Jul 30 2021 12:45:08 +0000 Subject: ipa-getkeytab: fix compiler warnings Make read_ipa_config and filter_keys static to avoid "no previous prototype" warnings. Use correct datatype of return value for ber_scanf to correct different signedness comparision. Fixed while working on https://pagure.io/freeipa/issue/8478 Signed-off-by: Rob Crittenden Reviewed-By: Alexander Bokovoy --- diff --git a/client/ipa-getkeytab.c b/client/ipa-getkeytab.c index d3673eb..309b3c7 100644 --- a/client/ipa-getkeytab.c +++ b/client/ipa-getkeytab.c @@ -291,7 +291,7 @@ static int ldap_sasl_interact(LDAP *ld, unsigned flags, void *priv_data, void *s return ret; } -int filter_keys(krb5_context krbctx, struct keys_container *keys, +static int filter_keys(krb5_context krbctx, struct keys_container *keys, ber_int_t *enctypes) { struct krb_key_salt *ksdata; @@ -507,7 +507,7 @@ static int ldap_set_keytab(krb5_context krbctx, BerElement *sctrl = NULL; struct berval *control = NULL; LDAPControl **srvctrl = NULL; - int ret; + ber_tag_t ret; int kvno, i; ber_tag_t rtag; ber_int_t *encs = NULL; @@ -826,7 +826,7 @@ static int config_from_file(struct ini_cfgobj *cfgctx) return 0; } -int read_ipa_config(struct ipa_config **ipacfg) +static int read_ipa_config(struct ipa_config **ipacfg) { struct ini_cfgobj *cfgctx = NULL; struct value_obj *obj = NULL;