Module: wine Branch: master Commit: d8efcc9cb341e0ad7df2dad63a2a422d1dc42e45 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d8efcc9cb341e0ad7df2dad63a...
Author: Andrew Talbot andrew.talbot@talbotville.com Date: Tue Feb 19 22:24:42 2013 +0000
msvcrt: Avoid signed-unsigned integer comparisons.
---
dlls/msvcrt/file.c | 9 +++++---- dlls/msvcrt/locale.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index fc4154c..612f470 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -363,7 +363,7 @@ static int msvcrt_alloc_fd(HANDLE hand, int flag) /* caller must hold the files lock */ static MSVCRT_FILE* msvcrt_alloc_fp(void) { - unsigned int i; + int i; MSVCRT_FILE *file;
for (i = 3; i < MSVCRT_max_streams; i++) @@ -1047,7 +1047,8 @@ int CDECL MSVCRT__fcloseall(void) /* free everything on process exit */ void msvcrt_free_io(void) { - int i; + unsigned int i; + int j;
MSVCRT__fcloseall(); /* The Win32 _fcloseall() function explicitly doesn't close stdin, @@ -1061,9 +1062,9 @@ void msvcrt_free_io(void) for(i=0; i<sizeof(MSVCRT___pioinfo)/sizeof(MSVCRT___pioinfo[0]); i++) MSVCRT_free(MSVCRT___pioinfo[i]);
- for(i=0; i<MSVCRT_stream_idx; i++) + for(j=0; j<MSVCRT_stream_idx; j++) { - MSVCRT_FILE *file = msvcrt_get_file(i); + MSVCRT_FILE *file = msvcrt_get_file(j); if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES) { ((file_crit*)file)->crit.DebugInfo->Spare[0] = 0; diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 4540e9a..7fa4882 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -492,7 +492,7 @@ char* CDECL _Getmonths(void) void* CDECL _Gettnames(void) { MSVCRT___lc_time_data *ret, *cur = get_locinfo()->lc_time_curr; - int i, size = sizeof(MSVCRT___lc_time_data); + unsigned int i, size = sizeof(MSVCRT___lc_time_data);
TRACE("\n");