diff --git a/nselib/pcre.c b/nselib/pcre.c index d772e1277..afcc22021 100644 --- a/nselib/pcre.c +++ b/nselib/pcre.c @@ -52,7 +52,7 @@ static int get_startoffset(lua_State *L, int stackpos, size_t len) if(startoffset > 0) startoffset--; else if(startoffset < 0) { - startoffset += len; + startoffset += (int) len; if(startoffset < 0) startoffset = 0; } diff --git a/nselib/pcre.h b/nselib/pcre.h index e10abdec9..95f0a5b15 100644 --- a/nselib/pcre.h +++ b/nselib/pcre.h @@ -2,7 +2,12 @@ #define PCRE_H #ifdef WIN32 +#define _CRT_SECURE_NO_DEPRECATE 1 +#define _CRT_SECURE_NO_WARNINGS 1 /* otherwise msvc++ complains even for +safe operations, and request us to use their str*_s() functions */ +#pragma warning(disable: 4996) #define vsnprintf _vsnprintf +#define strdup _strdup #endif /* WIN32 */ #define NSE_PCRELIBNAME "pcre"