]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
Silence compiler formatting warnings for size_t
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Nov 2020 15:31:39 +0000 (15:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Nov 2020 15:31:39 +0000 (15:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c
src/writer.c

index 1871b740f7bbbd47d3e7b6b8a6f5e4c59c47f8ff..7100298b3de866f467b4e2ca3cbb567da32eec0c 100644 (file)
@@ -250,11 +250,11 @@ static int loc_database_read_signature(struct loc_database* db,
                char** dst, char* src, size_t length) {
        // Check for a plausible signature length
        if (length > LOC_SIGNATURE_MAX_LENGTH) {
-               ERROR(db->ctx, "Signature too long: %ld\n", length);
+               ERROR(db->ctx, "Signature too long: %zu\n", length);
                return -EINVAL;
        }
 
-       DEBUG(db->ctx, "Reading signature of %ld bytes\n", length);
+       DEBUG(db->ctx, "Reading signature of %zu bytes\n", length);
 
        // Allocate space
        *dst = malloc(length);
index 2f09b56b92c018c448a9861b87e7c8713aa32df6..c61a6dfc657e92c1f552207f9af81cf671cb38da 100644 (file)
@@ -612,7 +612,7 @@ static int loc_writer_create_signature(struct loc_writer* writer,
                goto END;
        }
 
-       DEBUG(writer->ctx, "Successfully generated signature of %lu bytes\n", *length);
+       DEBUG(writer->ctx, "Successfully generated signature of %zu bytes\n", *length);
        r = 0;
 
        // Dump signature