diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-02-03 00:43:44 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-02-03 00:44:35 +0200 |
commit | 1a60bef59efd38933d89125abadb8883e96fda7a (patch) | |
tree | 7323d06309ceeadc7e072801ec3d8b5145fdcf3d /soltools | |
parent | Silence compiler warnings (diff) | |
download | core-1a60bef59efd38933d89125abadb8883e96fda7a.tar.gz core-1a60bef59efd38933d89125abadb8883e96fda7a.zip |
Silence compiler warnings
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/mkdepend/ifparser.c | 7 | ||||
-rw-r--r-- | soltools/mkdepend/include.c | 2 | ||||
-rw-r--r-- | soltools/mkdepend/main.c | 4 | ||||
-rw-r--r-- | soltools/mkdepend/makefile.mk | 8 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 4 |
5 files changed, 20 insertions, 5 deletions
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c index 490d6052b6ed..abfb92c9e48a 100644 --- a/soltools/mkdepend/ifparser.c +++ b/soltools/mkdepend/ifparser.c @@ -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, ")"); diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index 48ca96344f1d..6213686e0c27 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -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' && diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 2ef01a2dc1d3..d63764df5eb2 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.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) diff --git a/soltools/mkdepend/makefile.mk b/soltools/mkdepend/makefile.mk index 630c688faba2..460b9f8a5ad1 100644 --- a/soltools/mkdepend/makefile.mk +++ b/soltools/mkdepend/makefile.mk @@ -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 \ diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index d1a7b4ba513f..37bf3a2af035 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -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] = ' '; |