From c64d4ce9682b35ff16a45c0121e187330ec2a4e7 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 6 Jun 2023 09:11:29 -0400 Subject: [PATCH] krb5: krb5_enctype_to_keytype cast krb5_enctype to krb5_keytype The struct _krb5_key_type.type is krb5_enctype. Cast it to krb5_keytype before assigning to the 'krb5_keytype *keytype' output variable to avoid a warning from Clang 1500 on Darwin. --- lib/krb5/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/krb5/crypto.c b/lib/krb5/crypto.c index f29a4ff43..699d227d6 100644 --- a/lib/krb5/crypto.c +++ b/lib/krb5/crypto.c @@ -51,7 +51,7 @@ static void free_key_schedule(krb5_context, struct _krb5_key_data *, struct _krb5_encryption_type *); -/* +/* * Converts etype to a user readable string and sets as a side effect * the krb5_error_message containing this string. Returns * KRB5_PROG_ETYPE_NOSUPP in not the conversion of the etype failed in @@ -859,7 +859,7 @@ krb5_enctype_to_keytype(krb5_context context, if(e == NULL) { return unsupported_enctype (context, etype); } - *keytype = e->keytype->type; /* XXX */ + *keytype = (krb5_keytype)e->keytype->type; return 0; }