diff options
| author | lhchavez <lhchavez@lhchavez.com> | 2019-01-05 22:12:48 -0800 |
|---|---|---|
| committer | lhchavez <lhchavez@lhchavez.com> | 2019-01-05 22:26:18 -0800 |
| commit | 7b453e7e39c6e27d63be0922a153e1cb47f33218 (patch) | |
| tree | 227aa2eef9c10852c306946d6f2c00ab60aafa07 /src/odb.c | |
| parent | fba70a9d5f1fa433968a3dfd51e3153c8eebe834 (diff) | |
| download | libgit2-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |
