]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: restore compat with clang
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Fri, 27 Feb 2026 20:16:37 +0000 (21:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Sun, 22 Mar 2026 15:52:22 +0000 (16:52 +0100)
clang says:
  src/dissect/dissect.c:292:17: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]

Another option would be to raise the C standard to C23. I think that'd
make sense, but it's better to do it separately.

src/dissect/dissect.c

index 8ede2f61a96d6db11738c96fc4bbbc4d476a918c..76c3f90c7e5a18bcc17d074a568a4755febd3f2d 100644 (file)
@@ -260,7 +260,7 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_in_memory = true;
                         break;
 
-                OPTION_LONG("root-hash", "HASH", "Specify root hash for verity"):
+                OPTION_LONG("root-hash", "HASH", "Specify root hash for verity"): {}
                 OPTION_LONG("usr-hash", "HASH", "Same, but for the usr partition"): {
                         _cleanup_(iovec_done) struct iovec roothash = {};
 
@@ -286,7 +286,7 @@ static int parse_argv(int argc, char *argv[]) {
                 OPTION_LONG("root-hash-sig", "SIG",
                             "Specify signature of root hash for verity as DER-encoded PKCS7, "
                             "either as a path to a file or as an ASCII base64-encoded string "
-                            "prefixed by 'base64:'"):
+                            "prefixed by 'base64:'"): {}
                 OPTION_LONG("usr-hash-sig", "SIG", "Same, but for the usr partition"): {
                         const char *value;
                         _cleanup_(iovec_done) struct iovec sig = {};
@@ -410,7 +410,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 /************************************ Commands ***************************************/
-                OPTION_GROUP("Commands"):
+                OPTION_GROUP("Commands"): {}
 
                 OPTION_COMMON_HELP:
                         return help();