]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/creds/creds.c
strv: make iterator in STRV_FOREACH() declaread in the loop
[thirdparty/systemd.git] / src / creds / creds.c
index c2a2eabbed40758cc18a37905019bd4b9fb1f10a..2fd314ff37176decc95c99860ba5505175fe86b3 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
+#include <unistd.h>
 
 #include "creds-util.h"
 #include "dirent-util.h"
@@ -232,7 +233,7 @@ static int transcode(
                 return r;
 
         default:
-                assert_not_reached("Unexpected transcoding mode");
+                assert_not_reached();
         }
 }
 
@@ -310,7 +311,6 @@ static int write_blob(FILE *f, const void *data, size_t size) {
 static int verb_cat(int argc, char **argv, void *userdata) {
         _cleanup_(closedirp) DIR *d = NULL;
         int r, ret = 0;
-        char **cn;
 
         r = open_credential_directory(&d);
         if (r == -ENXIO)
@@ -761,7 +761,7 @@ static int parse_argv(int argc, char *argv[]) {
                         return -EINVAL;
 
                 default:
-                        assert_not_reached("Unhandled option");
+                        assert_not_reached();
                 }
         }