From: Michael Tremer Date: Fri, 27 Nov 2020 15:31:39 +0000 (+0000) Subject: Silence compiler formatting warnings for size_t X-Git-Tag: 0.9.5~5 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=36b9fd75b9ec2201c0b1a5458d7d5acf0cf84918 Silence compiler formatting warnings for size_t Signed-off-by: Michael Tremer --- diff --git a/src/database.c b/src/database.c index 1871b74..7100298 100644 --- a/src/database.c +++ b/src/database.c @@ -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); diff --git a/src/writer.c b/src/writer.c index 2f09b56..c61a6df 100644 --- a/src/writer.c +++ b/src/writer.c @@ -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