- Fix some MSVC warnings
- Comment out files with duplicated functions
See CORE-6684
svn path=/trunk/; revision=57342
startup/mingw_helpers.c
startup/natstart.c
startup/charmax.c
startup/mingw_helpers.c
startup/natstart.c
startup/charmax.c
- startup/merr.c
- startup/atonexit.c
- startup/txtmode.c
+ #startup/merr.c
+ #startup/atonexit.c
+ #startup/txtmode.c
startup/pesect.c
startup/tlsmcrt.c
startup/tlsthrd.c
startup/pesect.c
startup/tlsmcrt.c
startup/tlsthrd.c
unsigned int i;
FILE *file;
unsigned int i;
FILE *file;
- for (i = 3; i < max_streams; i++)
+ for (i = 3; i < (unsigned int)max_streams; i++)
{
file = get_file(i);
if (!file)
{
file = get_file(i);
if (!file)
*handle_ptr = INVALID_HANDLE_VALUE;
}
wxflag_ptr++; handle_ptr++;
*handle_ptr = INVALID_HANDLE_VALUE;
}
wxflag_ptr++; handle_ptr++;
-/* INTERNAL: Set up all file descriptors,
- * as well as default streams (stdin, stderr and stdout)
+/* INTERNAL: Set up all file descriptors,
+ * as well as default streams (stdin, stderr and stdout)
*/
void msvcrt_init_io(void)
{
STARTUPINFOA si;
*/
void msvcrt_init_io(void)
{
STARTUPINFOA si;
ioinfo *fdinfo;
InitializeCriticalSection(&file_cs);
ioinfo *fdinfo;
InitializeCriticalSection(&file_cs);
*/
LONG CDECL _lseek(int fd, LONG offset, int whence)
{
*/
LONG CDECL _lseek(int fd, LONG offset, int whence)
{
- return _lseeki64(fd, offset, whence);
+ return (LONG)_lseeki64(fd, offset, whence);
}
/*********************************************************************
}
/*********************************************************************
else
creation = OPEN_EXISTING;
}
else
creation = OPEN_EXISTING;
}
switch( shflags )
{
case _SH_DENYRW:
switch( shflags )
{
case _SH_DENYRW:
wcp = (char *)&wc;
for(i=0; i<sizeof(wc); i++)
{
wcp = (char *)&wc;
for(i=0; i<sizeof(wc); i++)
{
{
file->_cnt--;
chp = file->_ptr++;
wcp[i] = *chp;
{
file->_cnt--;
chp = file->_ptr++;
wcp[i] = *chp;
else
{
j = _filbuf(file);
else
{
j = _filbuf(file);
_unlock_file(file);
return wc;
}
_unlock_file(file);
return wc;
}
c = fgetc(file);
if ((__mb_cur_max > 1) && isleadbyte(c))
{
c = fgetc(file);
if ((__mb_cur_max > 1) && isleadbyte(c))
{
_lock_file(file);
if(file->_cnt) {
_lock_file(file);
if(file->_cnt) {
- int pcnt=(file->_cnt>wrcnt)? wrcnt: file->_cnt;
+ int pcnt=((unsigned)file->_cnt>wrcnt)? wrcnt: file->_cnt;
memcpy(file->_ptr, ptr, pcnt);
file->_cnt -= pcnt;
file->_ptr += pcnt;
memcpy(file->_ptr, ptr, pcnt);
file->_cnt -= pcnt;
file->_ptr += pcnt;
/* first buffered data */
if(file->_cnt>0) {
/* first buffered data */
if(file->_cnt>0) {
- int pcnt= (rcnt>file->_cnt)? file->_cnt:rcnt;
+ int pcnt= (rcnt>(unsigned int)file->_cnt)? file->_cnt:rcnt;
memcpy(ptr, file->_ptr, pcnt);
file->_cnt -= pcnt;
file->_ptr += pcnt;
memcpy(ptr, file->_ptr, pcnt);
file->_cnt -= pcnt;
file->_ptr += pcnt;
}
file->_cnt = _read(file->_file, file->_base, file->_bufsiz);
file->_ptr = file->_base;
}
file->_cnt = _read(file->_file, file->_base, file->_bufsiz);
file->_ptr = file->_base;
- i = (file->_cnt<rcnt) ? file->_cnt : rcnt;
+ i = ((unsigned int)file->_cnt<rcnt) ? file->_cnt : rcnt;
/* If the buffer fill reaches eof but fread wouldn't, clear eof. */
if (i > 0 && i < file->_cnt) {
get_ioinfo(file->_file)->wxflag &= ~WX_ATEOF;
/* If the buffer fill reaches eof but fread wouldn't, clear eof. */
if (i > 0 && i < file->_cnt) {
get_ioinfo(file->_file)->wxflag &= ~WX_ATEOF;
/* Discard buffered input */
file->_cnt = 0;
file->_ptr = file->_base;
/* Discard buffered input */
file->_cnt = 0;
file->_ptr = file->_base;
/* Reset direction of i/o */
if(file->_flag & _IORW) {
file->_flag &= ~(_IOREAD|_IOWRT);
/* Reset direction of i/o */
if(file->_flag & _IORW) {
file->_flag &= ~(_IOREAD|_IOWRT);
*/
LONG CDECL ftell(FILE* file)
{
*/
LONG CDECL ftell(FILE* file)
{
- return _ftelli64(file);
+ return (LONG)_ftelli64(file);
}
/*********************************************************************
}
/*********************************************************************