programs/cmd: sign compare fixes
Austin English
austinenglish at gmail.com
Sun Aug 23 03:34:17 CDT 2009
--
-Austin
-------------- next part --------------
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index b544a37..6a577c3 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -1276,7 +1276,7 @@ void WCMD_if (WCHAR *p, CMD_LIST **cmdList) {
WINE_TRACE("Condition: %s\n", wine_dbgstr_w(condition));
if (!lstrcmpiW (condition, errlvlW)) {
- if (errorlevel >= atoiW(WCMD_parameter (p, 1+negate, NULL))) test = 1;
+ if ((int)errorlevel >= atoiW(WCMD_parameter (p, 1+negate, NULL))) test = 1;
WCMD_parameter (p, 2+negate, &command);
}
else if (!lstrcmpiW (condition, existW)) {
@@ -1385,7 +1385,7 @@ void WCMD_move (void) {
if (GetFileAttributes(dest) != INVALID_FILE_ATTRIBUTES) {
BOOL force = FALSE;
WCHAR copycmd[MAXSTRING];
- int len;
+ UINT len;
/* /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
if (strstrW (quals, parmNoY))
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
index 647f4f1..4b3daff 100644
--- a/programs/cmd/directory.c
+++ b/programs/cmd/directory.c
@@ -633,7 +633,8 @@ static void WCMD_dir_trailer(WCHAR drive) {
void WCMD_directory (WCHAR *cmd) {
WCHAR path[MAX_PATH], cwd[MAX_PATH];
- int status, paged_mode;
+ UINT status;
+ int paged_mode;
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
WCHAR *p;
WCHAR string[MAXSTRING];
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index d3aea6d..921c9ba 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -155,7 +155,7 @@ void WCMD_output (const WCHAR *format, ...) {
va_list ap;
WCHAR string[1024];
- int ret;
+ UINT ret;
va_start(ap,format);
ret = vsnprintfW(string, sizeof(string)/sizeof(WCHAR), format, ap);
@@ -255,7 +255,7 @@ void WCMD_output_asis (const WCHAR *message) {
ptr++;
};
if (*ptr == '\n') ptr++;
- WCMD_output_asis_len(message, (ptr) ? ptr - message : strlenW(message),
+ WCMD_output_asis_len(message, (ptr) ? ptr - message : (WCHAR)strlenW(message),
GetStdHandle(STD_OUTPUT_HANDLE));
if (ptr) {
numChars = 0;
More information about the wine-patches
mailing list