* 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> 2008-12-27 Vincent Torri <doursse at users dot sf dot net>
* configure.ac: * configure.ac:

View File

@ -28,7 +28,7 @@ DIR *opendir(char const *name)
char *tmp1; char *tmp1;
char *tmp2; char *tmp2;
DWORD attr; DWORD attr;
int l; size_t l;
#ifdef UNICODE #ifdef UNICODE
wchar_t *wname; wchar_t *wname;
char *d_name; char *d_name;

View File

@ -205,7 +205,7 @@ fnmatch(const char *pattern,
} }
else else
{ {
const int m = fnmatch_match_token(pattern + pos, *c, const size_t m = fnmatch_match_token(pattern + pos, *c,
leading, flags); leading, flags);
if (m == FNM_SYNTAXERR) if (m == FNM_SYNTAXERR)
@ -225,7 +225,7 @@ fnmatch(const char *pattern,
r = fnmatch_check_finals(pattern, states); r = fnmatch_check_finals(pattern, states);
fnmatch_list_of_states_free(states < new_states ? states : new_states, 2); fnmatch_list_of_states_free(states < new_states ? states : new_states, 2);
return r; return (int)r;
} }
#endif /* _MSC_VER || __MINGW32__ || __MINGW32CE__ */ #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]; char new_path[PATH_MAX];
IShellLink *pISL; IShellLink *pISL;
IPersistFile *pIPF; IPersistFile *pIPF;
unsigned int length; size_t length;
HRESULT res; HRESULT res;
size_t size; 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"); fprintf(stderr, "[Windows CE] error\n");
} }

View File

@ -130,10 +130,10 @@ setenv(const char *name,
{ {
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) ) #if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
char *old_name; char *old_name;
char *str; char *str;
int length; size_t length;
int res; int res;
if (!name || !*name) if (!name || !*name)
return -1; return -1;
@ -254,10 +254,10 @@ int
mkstemp(char *template) mkstemp(char *template)
{ {
const char lookup[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; const char lookup[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
char *suffix; char *suffix;
DWORD val; DWORD val;
int length; size_t length;
int i; int i;
if (!template) if (!template)
return 0; return 0;

View File

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

View File

@ -139,7 +139,7 @@ evil_getcwd(char *buffer, size_t size)
return buffer; return buffer;
#else #else
return _getcwd(buffer, size); return _getcwd(buffer, (int)size);
#endif /* ! _WIN32_WCE */ #endif /* ! _WIN32_WCE */
} }
@ -414,7 +414,7 @@ evil_pipe(int *fds)
#if defined (_WIN32_WCE) && ! defined (__CEGCC__) #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; return 1;
} }

View File

@ -20,14 +20,14 @@ evil_char_to_wchar(const char *text)
wchar_t *wtext; wchar_t *wtext;
int wsize; 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) || if ((wsize == 0) ||
(wsize > (int)(ULONG_MAX / sizeof(wchar_t)))) (wsize > (int)(ULONG_MAX / sizeof(wchar_t))))
return NULL; return NULL;
wtext = malloc(wsize * sizeof(wchar_t)); wtext = malloc(wsize * sizeof(wchar_t));
if (wtext) 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 NULL;
return wtext; return wtext;
@ -36,20 +36,20 @@ evil_char_to_wchar(const char *text)
char * char *
evil_wchar_to_char(const wchar_t *text) evil_wchar_to_char(const wchar_t *text)
{ {
char * atext; char *atext;
int size; size_t size;
int asize; int asize;
size = wcslen(text) + 1; 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) if (asize == 0)
return NULL; return NULL;
atext = (char*)malloc((asize + 1) * sizeof(char)); atext = (char*)malloc((asize + 1) * sizeof(char));
if (atext) 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; return NULL;
atext[asize] = '\0'; atext[asize] = '\0';