Kaydet (Commit) 1a60bef5 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Silence compiler warnings

üst 422b2c72
......@@ -103,7 +103,10 @@ parse_number (g, cp, valp)
return CALLFUNC(g, handle_error) (g, cp, "number");
#ifdef WIN32
*valp = strtol(cp, &cp, 0);
{
char *cp2;
*valp = strtol(cp, &cp2, 0);
}
#else
*valp = atoi (cp);
/* EMPTY */
......@@ -172,7 +175,7 @@ parse_value (g, cp, valp)
cp++;
}
DO (cp = parse_variable (g, cp, &var));
len = cp - var;
len = (int)(cp - var);
SKIPSPACE (cp);
if (paren && *cp != ')')
return CALLFUNC(g, handle_error) (g, cp, ")");
......
......@@ -291,7 +291,7 @@ void included_by(ip, newfile)
else {
for (i=0; i<ip->i_listlen; i++)
if (ip->i_list[ i ] == newfile) {
i = strlen(newfile->i_file);
i = (int)strlen(newfile->i_file);
if (!ip->i_included_sym &&
!(i > 2 &&
newfile->i_file[i-1] == 'c' &&
......
......@@ -33,6 +33,10 @@ in this Software without prior written authorization from the X Consortium.
#include <sys/stat.h>
#endif
#ifdef _WIN32
#include <io.h>
#endif
#ifdef _MSC_VER /* Define ssize_t */
#if !defined(_W64)
......
......@@ -48,6 +48,14 @@ UWINAPILIB=
CDEFS+=-DNO_X11 -DXP_PC -DHW_THREADS
.IF "$(COM)" == "MSC"
# C4100: unreferenced formal parameter
# C4131: uses old-style declarator
# C4242: conversion from 'int' to 'char', possible loss of data
# C4706: assignment within conditional expression
CDEFS+=-wd4100 -wd4131 -wd4242 -wd4706
.ENDIF
OBJFILES= \
$(OBJ)$/cppsetup.obj \
$(OBJ)$/ifparser.obj \
......
......@@ -111,12 +111,12 @@ void pr(ip, file, base)
char buf[ BUFSIZ ];
printed = TRUE;
len = strlen(ip->i_file)+1;
len = (int)strlen(ip->i_file)+1;
if (current_len + len > width || file != lastfile) {
lastfile = file;
sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
ip->i_file);
len = current_len = strlen(buf);
len = current_len = (int)strlen(buf);
}
else {
buf[0] = ' ';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment