594167
From e161d3a1297408415842731be73af765fbdc5c3b Mon Sep 17 00:00:00 2001
594167
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
594167
Date: Tue, 4 Jan 2022 09:31:25 +0100
594167
Subject: [PATCH] fuzz-bcd: silence warning about always-true comparison
594167
594167
Occurs with gcc-11.2.1-7.fc35.x86_64.
594167
594167
(cherry picked from commit 5377ad4ea44e771b5eb436d381ea9f3506488295)
594167
594167
Related: #2087652
594167
---
594167
 src/boot/efi/fuzz-bcd.c | 3 ++-
594167
 1 file changed, 2 insertions(+), 1 deletion(-)
594167
594167
diff --git a/src/boot/efi/fuzz-bcd.c b/src/boot/efi/fuzz-bcd.c
594167
index e5ed6638a4..3df55a5c36 100644
594167
--- a/src/boot/efi/fuzz-bcd.c
594167
+++ b/src/boot/efi/fuzz-bcd.c
594167
@@ -21,6 +21,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
594167
         assert_se(p);
594167
 
594167
         char16_t *title = get_bcd_title(p, size);
594167
-        assert_se(!title || char16_strlen(title) >= 0);
594167
+        if (title)
594167
+                (void) char16_strlen(title);
594167
         return 0;
594167
 }