mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fixed a lot of warnings.
svn path=/trunk/; revision=2012
This commit is contained in:
parent
25138c970a
commit
edd3aa06a7
5 changed files with 15 additions and 14 deletions
|
@ -10,13 +10,13 @@
|
|||
#include <crtdll/io.h>
|
||||
#include <windows.h>
|
||||
|
||||
size_t _read(int _fd, void *_buf, size_t _nbyte)
|
||||
size_t _read(int _fd, void *_buf, size_t _nbyte)
|
||||
{
|
||||
size_t _rbyte;
|
||||
DWORD _rbyte;
|
||||
|
||||
if (!ReadFile(_get_osfhandle(_fd),_buf,_nbyte,&_rbyte,NULL))
|
||||
if (!ReadFile(_get_osfhandle(_fd),_buf,_nbyte,&_rbyte,NULL))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return _rbyte;
|
||||
return (size_t)_rbyte;
|
||||
}
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
|
||||
size_t _write(int _fd, const void *_buf, size_t _nbyte)
|
||||
{
|
||||
size_t _wbyte;
|
||||
DWORD _wbyte;
|
||||
|
||||
if ( !WriteFile(_get_osfhandle(_fd),_buf,_nbyte,&_wbyte,NULL) ) {
|
||||
if (!WriteFile(_get_osfhandle(_fd),_buf,_nbyte,&_wbyte,NULL))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return _wbyte;
|
||||
return (size_t)_wbyte;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap)
|
|||
int len;
|
||||
|
||||
f._flag = _IOWRT|_IOSTRG;
|
||||
f._ptr = str;
|
||||
f._ptr = (char*)str;
|
||||
f._cnt = INT_MAX;
|
||||
f._file = -1;
|
||||
len = vfwprintf(&f,fmt, ap);
|
||||
|
@ -56,7 +56,7 @@ _vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap)
|
|||
FILE f;
|
||||
int len;
|
||||
f._flag = _IOWRT|_IOSTRG;
|
||||
f._ptr = str;
|
||||
f._ptr = (char*)str;
|
||||
f._cnt = maxlen;
|
||||
f._file = -1;
|
||||
len = vfwprintf(&f,fmt, ap);
|
||||
|
|
|
@ -32,7 +32,7 @@ void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ex
|
|||
else
|
||||
{
|
||||
*ext = 0;
|
||||
tmp_ext = path+strlen(path);
|
||||
tmp_ext = (char *)path+strlen(path);
|
||||
}
|
||||
if ( tmp_dir != NULL ) {
|
||||
strncpy(fname,tmp_dir+1,tmp_ext - tmp_dir - 1);
|
||||
|
@ -76,7 +76,7 @@ void _wsplitpath( const wchar_t *path, wchar_t *drive, wchar_t *dir, wchar_t *fn
|
|||
else
|
||||
{
|
||||
*ext = 0;
|
||||
tmp_ext = path+wcslen(path);
|
||||
tmp_ext = (wchar_t *)path+wcslen(path);
|
||||
}
|
||||
|
||||
if ( tmp_dir != NULL ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: init.c,v 1.11 2001/03/25 02:34:30 dwelch Exp $
|
||||
/* $Id: init.c,v 1.12 2001/06/25 23:48:20 ekohl Exp $
|
||||
*
|
||||
* reactos/subsys/csrss/init.c
|
||||
*
|
||||
|
@ -157,14 +157,14 @@ CsrServerInitialization (
|
|||
return FALSE;
|
||||
}
|
||||
RtlInitUnicodeString( &RefreshEventName, L"\\TextConsoleRefreshEvent" );
|
||||
InitializeObjectAttributes( &RefreshEventAttr, &RefreshEventName, NULL, NULL, NULL );
|
||||
InitializeObjectAttributes( &RefreshEventAttr, &RefreshEventName, 0, NULL, NULL );
|
||||
Status = NtCreateEvent( &RefreshEventHandle, STANDARD_RIGHTS_ALL, &RefreshEventAttr, FALSE, FALSE );
|
||||
if( !NT_SUCCESS( Status ) )
|
||||
{
|
||||
PrintString( "CSR: Unable to create refresh event!\n" );
|
||||
return FALSE;
|
||||
}
|
||||
Status = RtlCreateUserThread( NtCurrentProcess(), NULL, FALSE, 0, NULL, NULL, (PTHREAD_START_ROUTINE)Console_Api, (DWORD) RefreshEventHandle, NULL, NULL );
|
||||
Status = RtlCreateUserThread( NtCurrentProcess(), NULL, FALSE, 0, NULL, NULL, (PTHREAD_START_ROUTINE)Console_Api, (PVOID) RefreshEventHandle, NULL, NULL );
|
||||
if( !NT_SUCCESS( Status ) )
|
||||
{
|
||||
PrintString( "CSR: Unable to create console thread\n" );
|
||||
|
|
Loading…
Reference in a new issue