ole32: Cast-qual warnings fix

Andrew Talbot Andrew.Talbot at talbotville.com
Thu Jul 5 17:27:24 CDT 2007


Changelog:
    ole32: Cast-qual warnings fix.

diff -urN a/dlls/ole32/stg_bigblockfile.c b/dlls/ole32/stg_bigblockfile.c
--- a/dlls/ole32/stg_bigblockfile.c	2007-07-05 20:23:39.000000000 +0100
+++ b/dlls/ole32/stg_bigblockfile.c	2007-07-05 22:38:52.000000000 +0100
@@ -896,7 +896,7 @@
 
         if (bytes_left)
         {
-            readPtr = (LPBYTE)readPtr + bytes_to_page;
+            readPtr = (const BYTE *)readPtr + bytes_to_page;
             page_index ++;
             offset_in_page = 0;
             if (bytes_left > PAGE_SIZE)
diff -urN a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
--- a/dlls/ole32/stg_prop.c	2007-07-05 20:23:39.000000000 +0100
+++ b/dlls/ole32/stg_prop.c	2007-07-05 22:39:07.000000000 +0100
@@ -1775,8 +1775,8 @@
     assert(value);
     assert(extra);
     assert(closure);
-    c->hr = PropertyStorage_WritePropertyToStream(This,
-     c->propNum++, (DWORD)key, (PROPVARIANT *)value, c->sectionOffset);
+    c->hr = PropertyStorage_WritePropertyToStream(This, c->propNum++,
+     (DWORD)key, value, c->sectionOffset);
     return SUCCEEDED(c->hr);
 }
 
diff -urN a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
--- a/dlls/ole32/storage32.c	2007-07-05 20:23:40.000000000 +0100
+++ b/dlls/ole32/storage32.c	2007-07-05 22:57:49.000000000 +0100
@@ -4643,10 +4643,6 @@
     return STG_E_DOCFILECORRUPT;
   }
 
-  /*
-   * Here, I'm casting away the constness on the buffer variable
-   * This is OK since we don't intend to modify that buffer.
-   */
   *bytesWritten   = 0;
   bufferWalker = (const BYTE*)buffer;
 
@@ -4667,7 +4663,7 @@
 
     StorageImpl_WriteAt(This->parentStorage,
          ulOffset,
-         (BYTE*)bufferWalker,
+         bufferWalker,
          bytesToWrite,
          &bytesWrittenAt);
 



More information about the wine-patches mailing list