From 86e5bb86772cd61197b7b964c1c008223bfbbb32 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 30 Jul 2024 20:31:47 +0200 Subject: [PATCH] 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 (cherry picked from commit 6f25b46721a18cf4f036d041e7e5d275800a00b3) --- crypto/heimdal/lib/krb5/deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/krb5/deprecated.c b/crypto/heimdal/lib/krb5/deprecated.c index e7c0105ebf7f..02cf7614f932 100644 --- a/crypto/heimdal/lib/krb5/deprecated.c +++ b/crypto/heimdal/lib/krb5/deprecated.c @@ -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)