]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptsetup: fix unused variable (#6833)
authorMartin Pitt <martinpitt@users.noreply.github.com>
Fri, 15 Sep 2017 05:32:50 +0000 (07:32 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Sep 2017 05:32:50 +0000 (07:32 +0200)
When building without veracrypt, gcc warns

    ../src/cryptsetup/cryptsetup.c:55:13: warning: ‘arg_tcrypt_veracrypt’ defined but not used [-Wunused-variable]
      static bool arg_tcrypt_veracrypt = false;

Fix this by conditionalizing the declaration.

src/cryptsetup/cryptsetup.c

index 08ed7e53ba33355ccc6095facd4292d3329523d4..e1e1a9675ede4157d787b336cd8996ac4e18c6e3 100644 (file)
@@ -52,7 +52,9 @@ static bool arg_verify = false;
 static bool arg_discards = false;
 static bool arg_tcrypt_hidden = false;
 static bool arg_tcrypt_system = false;
+#ifdef CRYPT_TCRYPT_VERA_MODES
 static bool arg_tcrypt_veracrypt = false;
+#endif
 static char **arg_tcrypt_keyfiles = NULL;
 static uint64_t arg_offset = 0;
 static uint64_t arg_skip = 0;