Commit 6221e300 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

cmd: Avoid comparison between signed and unsigned values.

parent a3ca9a8b
......@@ -186,12 +186,12 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, WCHAR **end) {
* NULL on error or EOF
*/
WCHAR *WCMD_fgets(WCHAR *buf, int noChars, HANDLE h)
WCHAR *WCMD_fgets(WCHAR *buf, DWORD noChars, HANDLE h)
{
DWORD charsRead;
BOOL status;
LARGE_INTEGER filepos;
int i;
DWORD i;
/* We can't use the native f* functions because of the filename syntax differences
between DOS and Unix. Also need to lose the LF (or CRLF) from the line. */
......
......@@ -1323,9 +1323,9 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
* Simple on-line help. Help text is stored in the resource file.
*/
void WCMD_give_help (const WCHAR *command) {
int i;
void WCMD_give_help (const WCHAR *command)
{
size_t i;
command = WCMD_skip_leading_spaces((WCHAR*) command);
if (strlenW(command) == 0) {
......@@ -1630,7 +1630,7 @@ void WCMD_move (void)
if (GetFileAttributesW(dest) != INVALID_FILE_ATTRIBUTES) {
BOOL force = FALSE;
WCHAR copycmd[MAXSTRING];
int len;
DWORD len;
/* /-Y has the highest priority, then /Y and finally the COPYCMD env. variable */
if (strstrW (quals, parmNoY))
......
......@@ -627,10 +627,10 @@ static void WCMD_dir_trailer(WCHAR drive) {
*
*/
void WCMD_directory (WCHAR *cmd) {
void WCMD_directory (WCHAR *cmd)
{
WCHAR path[MAX_PATH], cwd[MAX_PATH];
int status;
DWORD status;
CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
WCHAR *p;
WCHAR string[MAXSTRING];
......
......@@ -101,7 +101,7 @@ static inline BOOL WCMD_is_console_handle(HANDLE h)
{
return (((DWORD_PTR)h) & 3) == 3;
}
WCHAR *WCMD_fgets (WCHAR *buf, int n, HANDLE stream);
WCHAR *WCMD_fgets (WCHAR *buf, DWORD n, HANDLE stream);
WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, WCHAR **end);
WCHAR *WCMD_skip_leading_spaces (WCHAR *string);
BOOL WCMD_keyword_ws_found(const WCHAR *keyword, int len, const WCHAR *ptr);
......
......@@ -123,8 +123,8 @@ static char *get_file_buffer(void)
* and hence required WriteConsoleW to output it, however if file i/o is
* redirected, it needs to be WriteFile'd using OEM (not ANSI) format
*/
static void WCMD_output_asis_len(const WCHAR *message, int len, HANDLE device) {
static void WCMD_output_asis_len(const WCHAR *message, DWORD len, HANDLE device)
{
DWORD nOut= 0;
DWORD res = 0;
......@@ -169,7 +169,7 @@ void WCMD_output (const WCHAR *format, ...) {
va_list ap;
WCHAR string[1024];
int ret;
DWORD ret;
va_start(ap,format);
ret = vsnprintfW(string, sizeof(string)/sizeof(WCHAR), format, ap);
......@@ -191,7 +191,7 @@ void WCMD_output_stderr (const WCHAR *format, ...) {
va_list ap;
WCHAR string[1024];
int ret;
DWORD ret;
va_start(ap,format);
ret = vsnprintfW(string, sizeof(string)/sizeof(WCHAR), format, ap);
......
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