Fix lots of compile warnings

This commit is contained in:
Zeex 2014-01-25 23:59:53 +07:00
parent 74625128c4
commit 2e215418fc
2 changed files with 6 additions and 3 deletions

View File

@ -23,6 +23,10 @@ IF(HAVE_ALLOCA_H)
ADD_DEFINITIONS(-DHAVE_ALLOCA_H)
ENDIF(HAVE_ALLOCA_H)
IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(MSVC)
IF(UNIX)
ADD_DEFINITIONS(-DLINUX -DENABLE_BINRELOC -g)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../linux)

View File

@ -231,7 +231,6 @@ static void check_empty(const unsigned char *lptr)
static void doinclude(int silent)
{
char name[_MAX_PATH];
char *ptr;
char c;
int i, result;
@ -1760,7 +1759,7 @@ SC_FUNC void preprocess(void)
static const unsigned char *unpackedstring(const unsigned char *lptr,int *flags)
{
unsigned char *stringize;
const unsigned char *stringize;
int instring=1;
if (*flags & STRINGIZE) /* ignore leading spaces after the # */
while (*lptr==' ' || *lptr=='\t') /* this is as defines with parameters may add them */
@ -1831,7 +1830,7 @@ static const unsigned char *packedstring(const unsigned char *lptr,int *flags)
{
int i;
ucell val,c;
unsigned char *stringize;
const unsigned char *stringize;
int instring=1;
if (*flags & STRINGIZE)
while (*lptr==' ' || *lptr=='\t')