summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2017-10-18 15:05:20 -0400
committerPeter Jones <pmjones@gmail.com>2018-03-12 16:21:43 -0400
commit3b56e56a43864ba584c455365b2108ff2ceaed5a (patch)
treee8316035cea915b54e78ac385a3bfe65ce5cb6be
parent0019789582ed91497570629207b419a9dfc148a7 (diff)
downloadefi-boot-shim-3b56e56a43864ba584c455365b2108ff2ceaed5a.tar.gz
efi-boot-shim-3b56e56a43864ba584c455365b2108ff2ceaed5a.zip
shim: Mitigate a minor clang-analyzer complaint.
Clang believes "SumOfBytesHashed" is never used, because the thing that uses that computed value is #if 0'd currently. Just swizzle the #if's so that line is also not compiled. Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--shim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index 02fde5c6..c18b81db 100644
--- a/shim.c
+++ b/shim.c
@@ -916,10 +916,12 @@ static EFI_STATUS generate_hash (char *data, unsigned int datasize_in,
goto done;
}
+#if 1
+ }
+#else // we have to migrate to doing this later :/
SumOfBytesHashed += hashsize;
}
-#if 0 // we have to migrate to doing this later :/
/* Hash all remaining data */
if (datasize > SumOfBytesHashed) {
hashbase = data + SumOfBytesHashed;