]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fuzz-bcd: silence warning about always-true comparison
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 4 Jan 2022 08:31:25 +0000 (09:31 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 4 Jan 2022 11:49:45 +0000 (11:49 +0000)
Occurs with gcc-11.2.1-7.fc35.x86_64.

src/boot/efi/fuzz-bcd.c

index e5ed6638a48513d4368277d8b7000cbfd256b3fb..3df55a5c363485335639edd4f9f64e273a9f1630 100644 (file)
@@ -21,6 +21,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
         assert_se(p);
 
         char16_t *title = get_bcd_title(p, size);
-        assert_se(!title || char16_strlen(title) >= 0);
+        if (title)
+                (void) char16_strlen(title);
         return 0;
 }