Fix redeclaration warnings in MSVC Signed-off-by: Vicent Marti <tanoku@gmail.com>
diff --git a/src/msvc-compat.h b/src/msvc-compat.h
index 62ab0af..09492ba 100644
--- a/src/msvc-compat.h
+++ b/src/msvc-compat.h
@@ -20,6 +20,9 @@ typedef __int64 off64_t;
# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG)
# define S_ISFIFO(m) (((m) & _S_IFMT) == _S_IFIFO)
+#if (_MSC_VER >= 1600)
+# include <stdint.h>
+#else
/* add some missing <stdint.h> typedef's */
typedef signed char int8_t;
typedef unsigned char uint8_t;
@@ -35,6 +38,7 @@ typedef unsigned long long uint64_t;
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
+#endif
#endif
diff --git a/src/odb.c b/src/odb.c
index 0b6fecb..fd8c271 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1435,7 +1435,7 @@ static int unpack_object(git_rawobj *out, git_pack *p, index_entry *e)
deflated_size = (size_t)e->size;
if (deflated_size == 0)
- deflated_size = p->pack_size - e->offset;
+ deflated_size = (size_t)(p->pack_size - e->offset);
byte = *buffer++ & 0xFF;
deflated_size--;