programs/cmd: sign compare fixes
Austin English
austinenglish at gmail.com
Mon Jul 13 19:56:22 CDT 2009
--
-Austin
-------------- next part --------------
From 4b6c5d42184d2c945a0ae3659c32e9b84fefd962 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish at gmail.com>
Date: Mon, 13 Jul 2009 15:45:21 -0500
Subject: [PATCH] programs/cmd: sign compare fixes
---
programs/cmd/builtins.c | 4 ++--
programs/cmd/directory.c | 3 ++-
programs/cmd/wcmdmain.c | 4 ++--
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 0e99f52..a105385 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 (errorlevel >= (WCHAR)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;
+ unsigned int 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..31d64a6 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;
+ int paged_mode;
+ unsigned int status;
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
WCHAR *p;
WCHAR string[MAXSTRING];
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index d3aea6d..f758d61 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;
+ unsigned int 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;
--
1.5.4.3
More information about the wine-patches
mailing list