diff --git a/src/win32/mingw-compat.h b/src/win32/mingw-compat.h index 97b1cb71b..fe0abfb54 100644 --- a/src/win32/mingw-compat.h +++ b/src/win32/mingw-compat.h @@ -21,7 +21,7 @@ GIT_INLINE(size_t) p_strnlen(const char *s, size_t maxlen) { const char *end = memchr(s, 0, maxlen); - return end ? (end - s) : maxlen; + return end ? (size_t)(end - s) : maxlen; } #endif