diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog index dd9e66d464..fddc9c68c3 100644 --- a/legacy/evil/ChangeLog +++ b/legacy/evil/ChangeLog @@ -1,3 +1,15 @@ +2009-01-12 Vincent Torri + + * src/lib/evil_dirent.c: + * src/lib/evil_fnmatch.c: + * src/lib/evil_link_xp.cpp: + * src/lib/evil_stdio.c: + * src/lib/evil_stdlib.c: + * src/lib/evil_string.c: + * src/lib/evil_unistd.c: + * src/lib/evil_util.c: + warnings fixes + 2008-12-27 Vincent Torri * configure.ac: diff --git a/legacy/evil/src/lib/evil_dirent.c b/legacy/evil/src/lib/evil_dirent.c index 94885f081b..aa936afb82 100644 --- a/legacy/evil/src/lib/evil_dirent.c +++ b/legacy/evil/src/lib/evil_dirent.c @@ -28,7 +28,7 @@ DIR *opendir(char const *name) char *tmp1; char *tmp2; DWORD attr; - int l; + size_t l; #ifdef UNICODE wchar_t *wname; char *d_name; diff --git a/legacy/evil/src/lib/evil_fnmatch.c b/legacy/evil/src/lib/evil_fnmatch.c index d7e78b9d6e..000b646d91 100644 --- a/legacy/evil/src/lib/evil_fnmatch.c +++ b/legacy/evil/src/lib/evil_fnmatch.c @@ -205,7 +205,7 @@ fnmatch(const char *pattern, } else { - const int m = fnmatch_match_token(pattern + pos, *c, + const size_t m = fnmatch_match_token(pattern + pos, *c, leading, flags); if (m == FNM_SYNTAXERR) @@ -225,7 +225,7 @@ fnmatch(const char *pattern, r = fnmatch_check_finals(pattern, states); fnmatch_list_of_states_free(states < new_states ? states : new_states, 2); - return r; + return (int)r; } #endif /* _MSC_VER || __MINGW32__ || __MINGW32CE__ */ diff --git a/legacy/evil/src/lib/evil_link_xp.cpp b/legacy/evil/src/lib/evil_link_xp.cpp index 820bea1cb5..7b6cdc3809 100644 --- a/legacy/evil/src/lib/evil_link_xp.cpp +++ b/legacy/evil/src/lib/evil_link_xp.cpp @@ -90,7 +90,7 @@ readlink(const char *path, char *buf, size_t bufsiz) char new_path[PATH_MAX]; IShellLink *pISL; IPersistFile *pIPF; - unsigned int length; + size_t length; HRESULT res; size_t size; diff --git a/legacy/evil/src/lib/evil_stdio.c b/legacy/evil/src/lib/evil_stdio.c index 6f9896647e..9f45d48ff0 100644 --- a/legacy/evil/src/lib/evil_stdio.c +++ b/legacy/evil/src/lib/evil_stdio.c @@ -16,7 +16,7 @@ * */ -void perror (const char *s) +void perror (const char *s __UNUSED__) { fprintf(stderr, "[Windows CE] error\n"); } diff --git a/legacy/evil/src/lib/evil_stdlib.c b/legacy/evil/src/lib/evil_stdlib.c index 0f6d72742d..c7a98c1aef 100644 --- a/legacy/evil/src/lib/evil_stdlib.c +++ b/legacy/evil/src/lib/evil_stdlib.c @@ -130,10 +130,10 @@ setenv(const char *name, { #if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) ) - char *old_name; - char *str; - int length; - int res; + char *old_name; + char *str; + size_t length; + int res; if (!name || !*name) return -1; @@ -254,10 +254,10 @@ int mkstemp(char *template) { const char lookup[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - char *suffix; - DWORD val; - int length; - int i; + char *suffix; + DWORD val; + size_t length; + int i; if (!template) return 0; diff --git a/legacy/evil/src/lib/evil_string.c b/legacy/evil/src/lib/evil_string.c index 7008ef8e98..6e02cba8b4 100644 --- a/legacy/evil/src/lib/evil_string.c +++ b/legacy/evil/src/lib/evil_string.c @@ -13,7 +13,7 @@ * */ -char *strerror (int errnum) +char *strerror (int errnum __UNUSED__) { return "[Windows CE] error\n"; } diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.c index 6dd97a548f..a01da312eb 100644 --- a/legacy/evil/src/lib/evil_unistd.c +++ b/legacy/evil/src/lib/evil_unistd.c @@ -139,7 +139,7 @@ evil_getcwd(char *buffer, size_t size) return buffer; #else - return _getcwd(buffer, size); + return _getcwd(buffer, (int)size); #endif /* ! _WIN32_WCE */ } @@ -414,7 +414,7 @@ evil_pipe(int *fds) #if defined (_WIN32_WCE) && ! defined (__CEGCC__) -int execvp( const char *file, char *const argv[]) +int execvp (const char *file __UNUSED__, char *const argv[] __UNUSED__) { return 1; } diff --git a/legacy/evil/src/lib/evil_util.c b/legacy/evil/src/lib/evil_util.c index 49df43e5dd..fa6f83bb7b 100644 --- a/legacy/evil/src/lib/evil_util.c +++ b/legacy/evil/src/lib/evil_util.c @@ -20,14 +20,14 @@ evil_char_to_wchar(const char *text) wchar_t *wtext; int wsize; - wsize = MultiByteToWideChar(CP_ACP, 0, text, strlen(text) + 1, NULL, 0); + wsize = MultiByteToWideChar(CP_ACP, 0, text, (int)strlen(text) + 1, NULL, 0); if ((wsize == 0) || (wsize > (int)(ULONG_MAX / sizeof(wchar_t)))) return NULL; wtext = malloc(wsize * sizeof(wchar_t)); if (wtext) - if (!MultiByteToWideChar(CP_ACP, 0, text, strlen(text) + 1, wtext, wsize)) + if (!MultiByteToWideChar(CP_ACP, 0, text, (int)strlen(text) + 1, wtext, wsize)) return NULL; return wtext; @@ -36,20 +36,20 @@ evil_char_to_wchar(const char *text) char * evil_wchar_to_char(const wchar_t *text) { - char * atext; - int size; + char *atext; + size_t size; int asize; size = wcslen(text) + 1; - asize = WideCharToMultiByte(CP_ACP, 0, text, size, NULL, 0, NULL, NULL); + asize = WideCharToMultiByte(CP_ACP, 0, text, (int)size, NULL, 0, NULL, NULL); if (asize == 0) return NULL; atext = (char*)malloc((asize + 1) * sizeof(char)); if (atext) - if (!WideCharToMultiByte(CP_ACP, 0, text, size, atext, asize, NULL, NULL)) + if (!WideCharToMultiByte(CP_ACP, 0, text, (int)size, atext, asize, NULL, NULL)) return NULL; atext[asize] = '\0';