summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-11-05 20:18:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-11-05 20:18:13 (GMT)
commitace5348dcb427bbce015a42a21a46dc02ae1b37b (patch)
treefed189ce949052d5c6b52c888f5437d3bccccc9f /git-compat-util.h
parenta878e7e62b4826a95effa1420cff47807f9cb88b (diff)
parentfdcdb778551b904d57c127d9a3546f6a7c8792d3 (diff)
downloadgit-ace5348dcb427bbce015a42a21a46dc02ae1b37b.zip
git-ace5348dcb427bbce015a42a21a46dc02ae1b37b.tar.gz
git-ace5348dcb427bbce015a42a21a46dc02ae1b37b.tar.bz2
Merge branch 'js/misc-fixes' into maint
Various compilation fixes and squelching of warnings. * js/misc-fixes: Correct fscanf formatting string for I64u values Silence GCC's "cast of pointer to integer of a different size" warning Squelch warning about an integer overflow
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index f649e81..4fe10cc 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -296,6 +296,10 @@ extern char *gitbasename(char *);
#define PRIuMAX "llu"
#endif
+#ifndef SCNuMAX
+#define SCNuMAX PRIuMAX
+#endif
+
#ifndef PRIu32
#define PRIu32 "u"
#endif
@@ -568,7 +572,7 @@ extern int git_lstat(const char *, struct stat *);
#endif
#define DEFAULT_PACKED_GIT_LIMIT \
- ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
+ ((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? 8192 : 256))
#ifdef NO_PREAD
#define pread git_pread