mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
[REACTOS] Fix a number of MSVC warnings
This commit is contained in:
parent
b1c6c91d1f
commit
5d8e834897
43 changed files with 175 additions and 86 deletions
|
@ -140,7 +140,7 @@ struct UnicodeString : public RtlUnicodeString {
|
|||
|
||||
UnicodeString(size_t len, LPWSTR buffer)
|
||||
{
|
||||
alloc_len = len;
|
||||
alloc_len = (WORD)len;
|
||||
string_ptr = buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ extern "C" int wmain (int argc, wchar_t **argv)
|
|||
|
||||
// Now set back to the beginning
|
||||
ScreenInfo.dwCursorPosition.X = 0;
|
||||
ScreenInfo.dwCursorPosition.Y -= Drives.size();
|
||||
ScreenInfo.dwCursorPosition.Y -= (USHORT)Drives.size();
|
||||
SetConsoleCursorPosition (Screen, ScreenInfo.dwCursorPosition);
|
||||
|
||||
for (size_t d = 0; d < Drives.size (); d++)
|
||||
|
|
|
@ -182,10 +182,10 @@ private:
|
|||
}
|
||||
|
||||
string present_value( DWORD type, const char *data, DWORD len ) {
|
||||
switch( type ) {
|
||||
default:
|
||||
//switch( type ) {
|
||||
//default:
|
||||
return bindump( data, len );
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
void process_valid_request( HKEY open_reg_key, string key_name ) {
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
virtual BOOL Stop();
|
||||
virtual LPCServerClientSocket OnGetSocket(LPCServerSocket lpServerSocket);
|
||||
virtual LPCServerClientThread OnGetThread(LPCServerClientSocket Socket);
|
||||
virtual void OnAccept(const LPCServerClientThread lpThread);
|
||||
virtual void OnAccept(LPCServerClientThread lpThread);
|
||||
private:
|
||||
HTTPdState State;
|
||||
};
|
||||
|
|
|
@ -44,25 +44,25 @@ WriteStringAt(LPWSTR lpString,
|
|||
WORD wColor)
|
||||
{
|
||||
DWORD cWritten = 0;
|
||||
WORD wLen;
|
||||
DWORD dwLen;
|
||||
|
||||
if (!lpString || *lpString == 0) return;
|
||||
|
||||
wLen = wcslen(lpString);
|
||||
dwLen = (DWORD)wcslen(lpString);
|
||||
|
||||
/* Don't bother writing text when erasing */
|
||||
if (wColor)
|
||||
{
|
||||
WriteConsoleOutputCharacterW(ScreenBuffer,
|
||||
lpString,
|
||||
wLen,
|
||||
dwLen,
|
||||
xy,
|
||||
&cWritten);
|
||||
}
|
||||
|
||||
FillConsoleOutputAttribute(ScreenBuffer,
|
||||
wColor,
|
||||
wLen,
|
||||
dwLen,
|
||||
xy,
|
||||
&cWritten);
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ DisplayTitle(VOID)
|
|||
LPWSTR szTitle = L"ReactOS Coders Console Parade";
|
||||
COORD xy;
|
||||
|
||||
xy.X = (ScreenBufferInfo.dwSize.X - wcslen(szTitle)) / 2;
|
||||
xy.X = (ScreenBufferInfo.dwSize.X - (USHORT)wcslen(szTitle)) / 2;
|
||||
xy.Y = ScreenBufferInfo.dwSize.Y / 2;
|
||||
|
||||
WriteStringAt(szTitle, xy,
|
||||
|
|
|
@ -106,8 +106,8 @@ void DrawScene(HWND hwnd, HDC dc, int ticks)
|
|||
angle += ticks * 0.01;
|
||||
colorh += ticks * 0.003;
|
||||
if (colorh > 360.0) colorh -= 360.0;
|
||||
HLStoRGB(colorh, 1.0, 0.7, &rval, &gval, &bval);
|
||||
DrawCylinder(lvls, angle, 0.2);
|
||||
HLStoRGB(colorh, 1.0f, 0.7f, &rval, &gval, &bval);
|
||||
DrawCylinder(lvls, angle, 0.2f);
|
||||
SwapBuffers(dc);
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ void MyPixelFormat(HDC dc)
|
|||
|
||||
void InitGL(HWND hwnd)
|
||||
{
|
||||
GLfloat lightpos[4] = {2.0, 2.0, -2.0, 0.7};
|
||||
GLfloat lightpos[4] = {2.0f, 2.0f, -2.0f, 0.7f};
|
||||
GLfloat ca = 1.0;
|
||||
dc = GetDC(hwnd);
|
||||
MyPixelFormat(dc);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#ifdef HAVE_APITEST
|
||||
#include <apitest.h>
|
||||
#define ATLASSUME(x) /*empty*/
|
||||
#undef ATLASSERT
|
||||
#define ATLASSERT(x) /*empty*/
|
||||
#else
|
||||
#include "atltest.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue