summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorlhchavez <lhchavez@lhchavez.com>2019-01-05 22:12:48 -0800
committerlhchavez <lhchavez@lhchavez.com>2019-01-05 22:26:18 -0800
commit7b453e7e39c6e27d63be0922a153e1cb47f33218 (patch)
tree227aa2eef9c10852c306946d6f2c00ab60aafa07 /src/odb.c
parentfba70a9d5f1fa433968a3dfd51e3153c8eebe834 (diff)
downloadlibgit2-7b453e7e39c6e27d63be0922a153e1cb47f33218.tar.gz
Fix a bunch of warnings
This change fixes a bunch of warnings that were discovered by compiling with `clang -target=i386-pc-linux-gnu`. It turned out that the intrinsics were not necessarily being used in all platforms! Especially in GCC, since it does not support __has_builtin. Some more warnings were gleaned from the Windows build, but I stopped when I saw that some third-party dependencies (e.g. zlib) have warnings of their own, so we might never be able to enable -Werror there.
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 3aedd80a6..9bd5d2416 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -95,7 +95,7 @@ int git_odb__format_object_header(
int hdr_max = (hdr_size > INT_MAX-2) ? (INT_MAX-2) : (int)hdr_size;
int len;
- len = p_snprintf(hdr, hdr_max, "%s %lld", type_str, (long long)obj_len);
+ len = p_snprintf(hdr, hdr_max, "%s %"PRId64, type_str, (int64_t)obj_len);
if (len < 0 || len >= hdr_max) {
giterr_set(GITERR_OS, "object header creation failed");