]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/partition/repart.c
repart: Fix compilation warning when tpm2 is disabled
authorKrzesimir Nowak <knowak@microsoft.com>
Wed, 15 Nov 2023 16:39:10 +0000 (17:39 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 Nov 2023 19:55:50 +0000 (19:55 +0000)
commit59c8afbc89608af2212ad1a5e06d8536b595eeed
tree47a2a482a0b5e58ee31556a029e6b1530335a030
parent298b218fc8cba043bbb363f9e3c5085f6d4e72ee
repart: Fix compilation warning when tpm2 is disabled

The warning is about unused variable "flags":

```
../src/partition/repart.c: In function ‘partition_encrypt’:
../src/partition/repart.c:3690:19: warning: unused variable ‘flags’ [-Wunused-variable]
 3690 |         TPM2Flags flags = 0;
      |                   ^~~~~
```

Move the flags variable into the scope where it is actually used, which happens
to be inside the HAVE_TPM2 block.
src/partition/repart.c