[CMLIB]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 4 Feb 2012 12:23:27 +0000 (12:23 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 4 Feb 2012 12:23:27 +0000 (12:23 +0000)
Fix 64 bit / MSVC warnings

svn path=/trunk/; revision=55408

reactos/lib/cmlib/cmdata.h
reactos/lib/cmlib/cminit.c
reactos/lib/cmlib/cmlib.h
reactos/lib/cmlib/hivecell.c
reactos/lib/cmlib/hivewrt.c

index bce6e2a..a717f73 100644 (file)
@@ -57,7 +57,7 @@ typedef struct _CM_VIEW_OF_FILE
     LIST_ENTRY PinViewList;
     ULONG FileOffset;
     ULONG Size;
-    PULONG ViewAddress;
+    PULONG_PTR ViewAddress;
     PVOID Bcb;
     ULONG UseCount;
 } CM_VIEW_OF_FILE, *PCM_VIEW_OF_FILE;
index 1be9b65..f923bb4 100644 (file)
@@ -18,10 +18,10 @@ CmCreateRootNode(
 {
    PCM_KEY_NODE KeyCell;
    HCELL_INDEX RootCellIndex;
-   SIZE_T NameSize;
+   ULONG NameSize;
 
    /* Allocate the cell */
-   NameSize = strlenW(Name) * sizeof(WCHAR);
+   NameSize = (ULONG)strlenW(Name) * sizeof(WCHAR);
    RootCellIndex = HvAllocateCell(Hive,
                                   FIELD_OFFSET(CM_KEY_NODE, Name) + NameSize,
                                   Stable,
@@ -54,7 +54,7 @@ CmCreateRootNode(
    KeyCell->MaxClassLen = 0;
    KeyCell->MaxValueNameLen = 0;
    KeyCell->MaxValueDataLen = 0;
-   
+
    /* Write the name */
    KeyCell->NameLength = (USHORT)NameSize;
    memcpy(KeyCell->Name, Name, NameSize);
index 5a4abbf..ef14cc4 100644 (file)
@@ -253,7 +253,7 @@ HvGetCellSize(
 HCELL_INDEX CMAPI
 HvAllocateCell(
    PHHIVE RegistryHive,
-   SIZE_T Size,
+   ULONG Size,
    HSTORAGE_TYPE Storage,
    IN HCELL_INDEX Vicinity);
 
index 8151651..b0e35aa 100644 (file)
@@ -337,7 +337,7 @@ HvpCreateHiveFreeCellList(
 HCELL_INDEX CMAPI
 HvAllocateCell(
    PHHIVE RegistryHive,
-   SIZE_T Size,
+   ULONG Size,
    HSTORAGE_TYPE Storage,
    HCELL_INDEX Vicinity)
 {
@@ -546,7 +546,7 @@ HvTrackCellRef(PHV_TRACK_CELL_REF CellRef,
         CellRef->StaticCount++;
         return TRUE;
     }
-    
+
     /* FIXME: TODO */
     DPRINT1("ERROR: Too many references\n");
     while (TRUE);
@@ -562,10 +562,10 @@ HvReleaseFreeCellRefArray(PHV_TRACK_CELL_REF CellRef)
 
     /* Any references? */
     if (CellRef->StaticCount > 0)
-    { 
+    {
         /* Sanity check */
         ASSERT(CellRef->StaticCount <= STATIC_CELL_PAIR_COUNT);
-        
+
         /* Loop them */
         for (i = 0; i < CellRef->StaticCount;i++)
         {
@@ -577,4 +577,4 @@ HvReleaseFreeCellRefArray(PHV_TRACK_CELL_REF CellRef)
         /* Free again */
         CellRef->StaticCount = 0;
     }
-}
\ No newline at end of file
+}
index 7ecadff..fb046fd 100644 (file)
@@ -14,8 +14,8 @@ HvpWriteLog(
    PHHIVE RegistryHive)
 {
    ULONG FileOffset;
-   SIZE_T BufferSize;
-   SIZE_T BitmapSize;
+   ULONG BufferSize;
+   ULONG BitmapSize;
    PUCHAR Buffer;
    PUCHAR Ptr;
    ULONG BlockIndex;