* 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



SVN revision: 38552
This commit is contained in:
Vincent Torri 2009-01-12 06:03:51 +00:00
parent ec970510ec
commit c8c9bf3062
9 changed files with 34 additions and 22 deletions

View File

@ -1,3 +1,15 @@
2009-01-12 Vincent Torri <doursse at users dot sf dot net>
* 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 <doursse at users dot sf dot net>
* configure.ac:

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
*
*/
void perror (const char *s)
void perror (const char *s __UNUSED__)
{
fprintf(stderr, "[Windows CE] error\n");
}

View File

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

View File

@ -13,7 +13,7 @@
*
*/
char *strerror (int errnum)
char *strerror (int errnum __UNUSED__)
{
return "[Windows CE] error\n";
}

View File

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

View File

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