cmd: Avoid comparison between signed and unsigned values.

This commit is contained in:
Frédéric Delanoy 2011-11-07 10:52:22 +01:00 committed by Alexandre Julliard
parent a3ca9a8bff
commit 6221e300bc
5 changed files with 14 additions and 14 deletions

View File

@ -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. */

View File

@ -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))

View File

@ -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];

View File

@ -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);

View File

@ -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);