From 014aa4569d85d699823dd23d242fd8b4b7cba050 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 17 Jan 2022 12:11:38 -0600 Subject: [PATCH] krb5: Attempt to quiet coverity in warning user We sometimes use this idiom where we ignore the result of some function such as krb5_unparse_name() and then we log something and we use the ternary operator to handle any error from that function by substituting a string like "" or "". This yields some static analyzer complaints. Maybe casting the function's result to void will help. --- lib/krb5/init_creds_pw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/krb5/init_creds_pw.c b/lib/krb5/init_creds_pw.c index 1da580569..903476a42 100644 --- a/lib/krb5/init_creds_pw.c +++ b/lib/krb5/init_creds_pw.c @@ -432,8 +432,8 @@ krb5_init_creds_warn_user(krb5_context context, if (!suppress) { char *str = NULL, *p = NULL; int aret; - krb5_enctype_to_string(context, weak_enctype, &str); + (void) krb5_enctype_to_string(context, weak_enctype, &str); aret = asprintf(&p, "Encryption type %s(%d) used for authentication is weak and will be deprecated", str ? str : "unknown", weak_enctype); if (aret >= 0 && p) {