git: 6f25b46721a1 - main - Fix enum warning in heimdal

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Tue, 30 Jul 2024 19:30:18 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=6f25b46721a18cf4f036d041e7e5d275800a00b3

commit 6f25b46721a18cf4f036d041e7e5d275800a00b3
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-07-30 18:31:47 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-07-30 19:24:17 +0000

    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
---
 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)