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.