From 7416bd4e8e4065088e3d88e1810c737c753bf8ce Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Thu, 6 Aug 2015 15:47:16 +0100 Subject: [PATCH 1/2] hashindex: Fix printf size specifiers in error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes warnings on 32-bit (x86). 1. Cast sizeof() to match printf specifier 2. Cast off_t to long long. This is guaranteed 64-bit. No performance concern because it's an error message. attic/_hashindex.c: In function ‘hashindex_read’: attic/_hashindex.c:148:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘unsigned int’ [-Wformat=] EPRINTF_MSG_PATH(path, "failed to read %ld bytes", sizeof(HashHeader)); ^ attic/_hashindex.c:188:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘off_t’ [-Wformat=] EPRINTF_MSG_PATH(path, "failed to read %ld bytes", length); ^ --- attic/_hashindex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attic/_hashindex.c b/attic/_hashindex.c index 060d89fd..d891d6be 100644 --- a/attic/_hashindex.c +++ b/attic/_hashindex.c @@ -145,7 +145,7 @@ hashindex_read(const char *path) EPRINTF_PATH(path, "fread failed"); } else { - EPRINTF_MSG_PATH(path, "failed to read %ld bytes", sizeof(HashHeader)); + EPRINTF_MSG_PATH(path, "failed to read %ld bytes", (long) sizeof(HashHeader)); } goto fail; } @@ -185,7 +185,7 @@ hashindex_read(const char *path) EPRINTF_PATH(path, "fread failed"); } else { - EPRINTF_MSG_PATH(path, "failed to read %ld bytes", length); + EPRINTF_MSG_PATH(path, "failed to read %lld bytes", (long long) buckets_length); } free(index->buckets); free(index); From 5d49641bb2d3ad8f3609bff842ec97b0850f9f3d Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Mon, 10 Aug 2015 10:26:07 +0100 Subject: [PATCH 2/2] gitignore: all cython generated files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ec439bf8..fbbf6aa9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ env .tox hashindex.c chunker.c +crypto.c +platform_linux.c *.egg-info *.pyc *.pyo