1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

Fix enum warning in heimdal

This fixes a clang 19 warning:

crypto/heimdal/lib/krb5/deprecated.c:75:17: error: comparison of different enumeration types ('krb5_keytype' (aka 'enum ENCTYPE') and 'enum krb5_keytype_old') [-Werror,-Wenum-compare]
   75 |     if (keytype != KEYTYPE_DES || context->etypes_des == NULL)
      |         ~~~~~~~ ^  ~~~~~~~~~~~

In https://github.com/heimdal/heimdal/commit/3bebbe5323 this was solved
by adding a cast. That commit is rather large, so I'm only applying the
one-liner here.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2024-07-30 20:31:47 +02:00
parent 057453ffdf
commit 6f25b46721

View File

@ -72,7 +72,7 @@ krb5_keytype_to_enctypes_default (krb5_context context,
unsigned int i, n;
krb5_enctype *ret;
if (keytype != KEYTYPE_DES || context->etypes_des == NULL)
if (keytype != (krb5_keytype)KEYTYPE_DES || context->etypes_des == NULL)
return krb5_keytype_to_enctypes (context, keytype, len, val);
for (n = 0; context->etypes_des[n]; ++n)