diff --git a/base/stringutil.cpp b/base/stringutil.cpp index 848993349e..f5a2675b18 100644 --- a/base/stringutil.cpp +++ b/base/stringutil.cpp @@ -38,7 +38,7 @@ void OutputDebugStringUTF8(const char *p) { #endif void StringTrimEndNonAlphaNum(char *str) { - int n = strlen(str); + ssize_t n = strlen(str); while (!isalnum(str[n]) && n >= 0) { str[n--] = '\0'; } diff --git a/ext/libzip/mkstemp.c b/ext/libzip/mkstemp.c index 62641f0af3..0dbaaf0572 100644 --- a/ext/libzip/mkstemp.c +++ b/ext/libzip/mkstemp.c @@ -61,7 +61,9 @@ _zip_mkstemp(wchar_t *path) _zip_mkstemp(char *path) #endif { +#ifndef _WIN32 int fd; +#endif #ifdef UNICODE wchar_t *start, *trv; struct _stat sbuf;