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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user