[OLE32][SYSDM][DESK]
authorRafal Harabien <rafalh@reactos.org>
Sat, 25 Jun 2011 13:49:48 +0000 (13:49 +0000)
committerRafal Harabien <rafalh@reactos.org>
Sat, 25 Jun 2011 13:49:48 +0000 (13:49 +0000)
- Fix MSVC warnings

svn path=/trunk/; revision=52451

reactos/dll/cpl/desk/advappdlg.c
reactos/dll/cpl/desk/theme.h
reactos/dll/cpl/sysdm/precomp.h
reactos/dll/cpl/sysdm/virtmem.c
reactos/dll/win32/ole32/ole32.spec

index 725fe82..837adcf 100644 (file)
@@ -276,8 +276,8 @@ SaveCurrentValues(HWND hwndDlg, GLOBALS *g)
        if (g_Assignment[g->CurrentElement].Font != -1)
        {
                g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfHeight = -MulDiv(GetDlgItemInt(hwndDlg, IDC_ADVAPPEARANCE_FONTSIZE_E, &bTranslated, FALSE), GetDeviceCaps(hdcDlg, LOGPIXELSY), 72);
-               g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight = (SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0, 0) == 1)?FW_BOLD:FW_NORMAL;
-               g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic = SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK, 0, 0);
+               g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfWeight = (SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTBOLD, BM_GETCHECK, 0, 0) == 1) ? FW_BOLD : FW_NORMAL;
+               g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfItalic = (BYTE)SendDlgItemMessage(hwndDlg, IDC_ADVAPPEARANCE_FONTITALIC, BM_GETCHECK, 0, 0);
                GetDlgItemText(hwndDlg, IDC_ADVAPPEARANCE_FONT_C, g->ThemeAdv.lfFont[g_Assignment[g->CurrentElement].Font].lfFaceName, LF_FACESIZE * sizeof(TCHAR));
        }
 
index 3641f07..7c72c98 100644 (file)
@@ -64,7 +64,7 @@ typedef struct
 {
        COLORREF crColor[NUM_COLORS];
        LOGFONT lfFont[NUM_FONTS];
-       UINT64 Size[NUM_SIZES];
+       INT Size[NUM_SIZES];
        BOOL bFlatMenus;
        EFFECTS Effects;
 } THEME;
index cf3afd6..f3b20cf 100644 (file)
@@ -49,11 +49,11 @@ INT_PTR CALLBACK LicenceDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
 
 typedef struct _PAGEFILE
 {
-    TCHAR szDrive[3];
-    INT   InitialSize;
-    INT   MaximumSize;
-    INT   FreeSize;
-    BOOL  bUsed;
+    TCHAR  szDrive[3];
+    UINT   InitialSize;
+    UINT   MaximumSize;
+    UINT   FreeSize;
+    BOOL   bUsed;
 } PAGEFILE, *PPAGEFILE;
 
 typedef struct _VIRTMEM
index c09b6e4..648b1c4 100644 (file)
@@ -206,8 +206,7 @@ WritePageFileSettings(PVIRTMEM pVirtMem)
     HKEY hk = NULL;
     TCHAR szPagingFiles[2048];
     TCHAR szText[256];
-    INT i;
-    INT nPos = 0;
+    INT i, nPos = 0;
     BOOL bErr = TRUE;
 
     for (i = 0; i < pVirtMem->Count; ++i)
@@ -312,7 +311,7 @@ OnSet(PVIRTMEM pVirtMem)
                                      LB_GETCURSEL,
                                      0,
                                      0);
-    if (Index < pVirtMem->Count)
+    if (Index >= 0 && Index < pVirtMem->Count)
     {
         /* check if custom settings are checked */
         if (IsDlgButtonChecked(pVirtMem->hSelf,
@@ -463,8 +462,8 @@ OnSelChange(HWND hwndDlg, PVIRTMEM pVirtMem)
         if (GetDiskFreeSpaceEx(pVirtMem->Pagefile[Index].szDrive,
                                NULL, NULL, &FreeBytes))
         {
-            pVirtMem->Pagefile[Index].FreeSize = FreeBytes.QuadPart >> 20;
-            _stprintf(szBuffer, _T("%I64u MB"), FreeBytes.QuadPart / (1024 * 1024));
+            pVirtMem->Pagefile[Index].FreeSize = (UINT)(FreeBytes.QuadPart / (1024 * 1024));
+            _stprintf(szBuffer, _T("%I64u MB"), pVirtMem->Pagefile[Index].FreeSize);
             SetDlgItemText(hwndDlg, IDC_SPACEAVAIL, szBuffer);
         }
 
index dfcc7c2..273ddba 100644 (file)
@@ -98,7 +98,7 @@
 @ stdcall CreatePointerMoniker(ptr ptr)
 @ stdcall CreateStreamOnHGlobal(ptr long ptr)
 @ stdcall DllDebugObjectRPCHook(long ptr)
-@ stdcall DllGetClassObject (ptr ptr ptr)
+@ stdcall -private DllGetClassObject (ptr ptr ptr)
 @ stub DllGetClassObjectWOW
 @ stdcall -private DllRegisterServer()
 @ stdcall -private DllUnregisterServer()