]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Fix unused variable warning
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 2 Jun 2024 17:57:39 +0000 (19:57 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Jun 2024 06:18:01 +0000 (15:18 +0900)
src/partition/repart.c

index b6c055f36f46e10c2687afc922a3e6928cd5c2c8..6f67d4602593da713e9625d95aced5137b265e17 100644 (file)
@@ -3929,7 +3929,9 @@ static int partition_encrypt(Context *context, Partition *p, PartitionTarget *ta
                 .flags = CRYPT_REENCRYPT_INITIALIZE_ONLY|CRYPT_REENCRYPT_MOVE_FIRST_SEGMENT,
         };
         _cleanup_(sym_crypt_freep) struct crypt_device *cd = NULL;
+#if HAVE_TPM2
         _cleanup_(erase_and_freep) char *base64_encoded = NULL;
+#endif
         _cleanup_fclose_ FILE *h = NULL;
         _cleanup_free_ char *hp = NULL, *vol = NULL, *dm_name = NULL;
         const char *passphrase = NULL;