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 "<unknown>" or "<out-of-memory>".  This yields some static
analyzer complaints.  Maybe casting the function's result to void will
help.
This commit is contained in:
Nicolas Williams
2022-01-17 12:11:38 -06:00
parent 2e631d3b1b
commit 014aa4569d

View File

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