]> git.ipfire.org Git - pakfire.git/commitdiff
hasher: Make the static analyzer happy
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 14:24:27 +0000 (14:24 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 14:24:27 +0000 (14:24 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/hasher.c

index e2c6d5f7b31a9a67b46fe1cd4acae298b220a420..ff2a2b9856ecdab8c9eaf0bf6e7ab3d80c198490 100644 (file)
@@ -18,6 +18,7 @@
 #                                                                             #
 #############################################################################*/
 
+#include <assert.h>
 #include <errno.h>
 #include <stdlib.h>
 
@@ -329,6 +330,9 @@ int pakfire_hash_file(struct pakfire_ctx* ctx,
        if (r < 0)
                goto ERROR;
 
+       // To make the static analyzer happy
+       assert(hasher);
+
        // Read the file into the hash functions
        while (!feof(f)) {
                bytes_read = fread(buffer, 1, sizeof(buffer), f);