]> eyrie.org Git - kerberos/pam-krb5.git/commitdiff
Fix cppcheck errors
authorRuss Allbery <eagle@eyrie.org>
Mon, 2 Mar 2020 05:42:30 +0000 (21:42 -0800)
committerRuss Allbery <eagle@eyrie.org>
Mon, 2 Mar 2020 05:42:30 +0000 (21:42 -0800)
Fix a couple of errors that cppcheck only detects in the older
version run by GitHub Actions, and update the suppression for
the verify label.

module/fast.c
module/prompting.c
tests/data/cppcheck.supp

index 948a35daba6b2b5f4d7da3373ede5eeee8f0464a..466199977fad97c4d915e7857d22c3729e5b27fd 100644 (file)
@@ -267,7 +267,7 @@ pamk5_fast_setup(struct pam_args *args, krb5_get_init_creds_opt *opts)
 {
     krb5_context c = args->config->ctx->context;
     krb5_error_code retval;
-    char *cache = NULL;
+    char *cache;
 
     /* First try to use fast_ccache, and then fall back on anon_fast. */
     cache = fast_setup_cache(args);
index 073b57dbde202f1611bdd773e927e6915db3dc0d..76f4acca5db1b5c0006bd6dace9b434c827845c9 100644 (file)
@@ -115,7 +115,7 @@ fail:
 int
 pamk5_get_password(struct pam_args *args, const char *prefix, char **password)
 {
-    char *prompt = NULL;
+    char *prompt;
     int retval;
 
     prompt = build_password_prompt(args, prefix);
index c6381790a826c0cf3c953268ba8ec0ff813f64ad..3d6c0d6a4ba434a9023faa3db31ab1a099437254 100644 (file)
@@ -52,4 +52,4 @@ uninitvar:php/php5_remctl.c:129
 uninitvar:php/php5_remctl.c:321
 
 // (pam-krb5) cppcheck doesn't recognize the unused attribute on labels.
-unusedLabel:auth.c:884
+unusedLabel:auth.c:894