[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ros-diffs
Subject:    [ros-diffs] [ion] 16348: Fix win32k warnings,
From:       <ion () svn ! reactos ! com>
Date:       2005-06-30 16:17:58
Message-ID: 000001c57d8f$47cbefb0$6b01a8c0 () PENELOPE
[Download RAW message or body]

Fix win32k warnings, get rid of windowsx.h dependency
Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsys/win32k/w32k.h
  _____  

Modified: trunk/reactos/subsys/win32k/ntuser/msgqueue.c
--- trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-06-30
16:04:08 UTC (rev 16347)
+++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-06-30
16:17:45 UTC (rev 16348)
@@ -526,8 +526,8 @@

         {
           MSLLHOOKSTRUCT MouseHookData;
 
-          MouseHookData.pt.x = GET_X_LPARAM(Msg.lParam); 
-          MouseHookData.pt.y = GET_Y_LPARAM(Msg.lParam); 
+          MouseHookData.pt.x = LOWORD(Msg.lParam); 
+          MouseHookData.pt.y = HIWORD(Msg.lParam); 
           switch(Msg.message)
             {
               case WM_MOUSEWHEEL:
  _____  

Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
--- trunk/reactos/subsys/win32k/objects/gdiobj.c	2005-06-30
16:04:08 UTC (rev 16347)
+++ trunk/reactos/subsys/win32k/objects/gdiobj.c	2005-06-30
16:17:45 UTC (rev 16348)
@@ -776,10 +776,10 @@

             }
             else
             {
-               InterlockedIncrement(&GdiHdr->Locks);
+               InterlockedIncrement((PLONG)&GdiHdr->Locks);
                if (GdiHdr->LockingThread != Thread)
                {
-                  InterlockedDecrement(&GdiHdr->Locks);
+                  InterlockedDecrement((PLONG)&GdiHdr->Locks);
 
                   /* Unlock the handle table entry. */
                   InterlockedExchangePointer(&HandleEntry->ProcessId,
PrevProcId);
@@ -917,13 +917,13 @@
             PGDIOBJHDR GdiHdr = GDIBdyToHdr(HandleEntry->KernelData);
 
 #ifdef GDI_DEBUG
-            if (InterlockedIncrement(&GdiHdr->Locks) == 1)
+            if (InterlockedIncrement((PLONG)&GdiHdr->Locks) == 1)
             {
                GdiHdr->lockfile = file;
                GdiHdr->lockline = line;
             }
 #else
-            InterlockedIncrement(&GdiHdr->Locks);
+            InterlockedIncrement((PLONG)&GdiHdr->Locks);
 #endif
             Object = HandleEntry->KernelData;
          }
@@ -987,13 +987,13 @@
 {
    PGDIOBJHDR GdiHdr = GDIBdyToHdr(Object);
 #ifdef GDI_DEBUG
-   if (InterlockedDecrement(&GdiHdr->Locks) == 0)
+   if (InterlockedDecrement((PLONG)&GdiHdr->Locks) == 0)
    {
       GdiHdr->lockfile = NULL;
       GdiHdr->lockline = 0;
    }
 #else
-   InterlockedDecrement(&GdiHdr->Locks);
+   InterlockedDecrement((PLONG)&GdiHdr->Locks);
 #endif
 }
 
  _____  

Modified: trunk/reactos/subsys/win32k/w32k.h
--- trunk/reactos/subsys/win32k/w32k.h	2005-06-30 16:04:08 UTC (rev
16347)
+++ trunk/reactos/subsys/win32k/w32k.h	2005-06-30 16:17:45 UTC (rev
16348)
@@ -17,12 +17,10 @@

 /* DDK/NDK/SDK Headers */
 #include <ddk/ntddk.h>
 #include <ddk/ntifs.h>
-#include <ddk/ddrawint.h>
-#include <ddk/d3dnthal.h>
 #include <ddk/winddi.h>
 #include <ddk/ntddmou.h>
 #include <windows.h>    /* FIXME ? */
-#include <windowsx.h>   /* FIXME ? */
+//#include <windowsx.h>   /* FIXME ? */
 #include <ndk/ntndk.h>
 
 /* FIXME: ReactOS will be R-Rated if I really write what I'm about to
*/

[Attachment #3 (text/html)]

<html>
<head>
<style>
<!--
body { background-color:#ffffff }
.file { border:1px solid #eeeeee; margin-top:1em; margin-bottom:1em }
.pathname { font-family:monospace; float:right }
.fileheader { margin-bottom:.5em }
.diff { margin:0 }
.tasklist { padding:4px; border:1px dashed #000000; margin-top:1em }
.tasklist ul { margin-top:0; margin-bottom:0 }
tr.alt { background-color:#eeeeee }
#added { background-color:#ddffdd }
#addedchars { background-color:#99ff99; font-weight:bolder }
tr.alt #added { background-color:#ccf7cc }
#removed { background-color:#ffdddd }
#removedchars { background-color:#ff9999; font-weight:bolder }
tr.alt #removed { background-color:#f7cccc }
#info { color:#888888 }
#context { background-color:#eeeeee }
td {padding-left:.3em; padding-right:.3em }
tr.head { border-bottom-width:1px; border-bottom-style:solid }
tr.head td { padding:0; padding-top:.2em }
.task { background-color:#ffff00 }
.comment { padding:4px; border:1px dashed #000000; background-color:#ffffdd }
.error { color:red }
hr { border-width:0px; height:2px; background:black }
-->
</style>
</head>
<body>
<pre class="comment">Fix win32k warnings, get rid of windowsx.h dependency</pre><pre \
                class="diff" id="context">Modified: \
                trunk/reactos/subsys/win32k/ntuser/msgqueue.c
Modified: trunk/reactos/subsys/win32k/objects/gdiobj.c
Modified: trunk/reactos/subsys/win32k/w32k.h
</pre><hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/subsys/win32k/ntuser/msgqueue.c</b></big></div> <pre \
class="diff"><small id="info">--- \
                trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-06-30 16:04:08 UTC \
                (rev 16347)
+++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c	2005-06-30 16:17:45 UTC (rev 16348)
@@ -526,8 +526,8 @@
</small></pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; {
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MSLLHOOKSTRUCT MouseHookData;
 
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; \
                &nbsp;MouseHookData.pt.x = GET_X_LPARAM(Msg.lParam); 
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MouseHookData.pt.<span id="removedchars">y = \
GET_Y_LPARAM</span>(Msg.lParam);  </pre><pre class="diff" id="added">+ &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp;MouseHookData.pt.<span id="addedchars">x = \
LOWORD</span>(Msg.lParam);  + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MouseHookData.pt.y = \
HIWORD(Msg.lParam);  </pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; switch(Msg.message)  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case WM_MOUSEWHEEL:
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/subsys/win32k/objects/gdiobj.c</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/subsys/win32k/objects/gdiobj.c	2005-06-30 16:04:08 UTC \
                (rev 16347)
+++ trunk/reactos/subsys/win32k/objects/gdiobj.c	2005-06-30 16:17:45 UTC (rev 16348)
@@ -776,10 +776,10 @@
</small></pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; }  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; InterlockedIncrement(&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
InterlockedIncrement(<span id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks); \
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp;if (GdiHdr-&gt;LockingThread != Thread)  &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp;{ </pre><pre class="diff" id="removed">- &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;InterlockedDecrement(&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;InterlockedDecrement(<span \
id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="context">   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* \
Unlock the handle table entry. */  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; InterlockedExchangePointer(&amp;HandleEntry-&gt;ProcessId, PrevProcId); \
@@ -917,13 +917,13 @@ </pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; PGDIOBJHDR GdiHdr = GDIBdyToHdr(HandleEntry-&gt;KernelData);  
 #ifdef GDI_DEBUG
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if \
(InterlockedIncrement(&amp;GdiHdr-&gt;Locks) == 1) </pre><pre class="diff" \
id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (InterlockedIncrement(<span \
id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks) == 1) </pre><pre class="diff" \
id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {  &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GdiHdr-&gt;lockfile = file;  &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GdiHdr-&gt;lockline = line;  &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; }  #else
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;InterlockedIncrement(&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;InterlockedIncrement(<span \
id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="context"> #endif  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Object = \
HandleEntry-&gt;KernelData;  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}
@@ -987,13 +987,13 @@
</pre><pre class="diff" id="context"> {
 &nbsp; &nbsp;PGDIOBJHDR GdiHdr = GDIBdyToHdr(Object);
 #ifdef GDI_DEBUG
</pre><pre class="diff" id="removed">- &nbsp; if \
(InterlockedDecrement(&amp;GdiHdr-&gt;Locks) == 0) </pre><pre class="diff" \
id="added">+ &nbsp; if (InterlockedDecrement(<span \
id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks) == 0) </pre><pre class="diff" \
id="context"> &nbsp; &nbsp;{  &nbsp; &nbsp; &nbsp; GdiHdr-&gt;lockfile = NULL;
 &nbsp; &nbsp; &nbsp; GdiHdr-&gt;lockline = 0;
 &nbsp; &nbsp;}
 #else
</pre><pre class="diff" id="removed">- &nbsp; \
InterlockedDecrement(&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" id="added">+ \
&nbsp; InterlockedDecrement(<span \
id="addedchars">(PLONG)</span>&amp;GdiHdr-&gt;Locks); </pre><pre class="diff" \
id="context"> #endif  }
 
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/subsys/win32k/w32k.h</b></big></div> <pre class="diff"><small \
                id="info">--- trunk/reactos/subsys/win32k/w32k.h	2005-06-30 16:04:08 \
                UTC (rev 16347)
+++ trunk/reactos/subsys/win32k/w32k.h	2005-06-30 16:17:45 UTC (rev 16348)
@@ -17,12 +17,10 @@
</small></pre><pre class="diff" id="context"> /* DDK/NDK/SDK Headers */
 #include &lt;ddk/ntddk.h&gt;
 #include &lt;ddk/ntifs.h&gt;
</pre><pre class="diff" id="removed">-#include &lt;ddk/ddrawint.h&gt;
-#include &lt;ddk/d3dnthal.h&gt;
</pre><pre class="diff" id="context"> #include &lt;ddk/winddi.h&gt;
 #include &lt;ddk/ntddmou.h&gt;
 #include &lt;windows.h&gt; &nbsp; &nbsp;/* FIXME ? */
</pre><pre class="diff" id="removed">-<span id="removedchars">#</span>include \
&lt;windowsx.h&gt; &nbsp; /* FIXME ? */ </pre><pre class="diff" id="added">+<span \
id="addedchars">//#</span>include &lt;windowsx.h&gt; &nbsp; /* FIXME ? */ </pre><pre \
class="diff" id="context"> #include &lt;ndk/ntndk.h&gt;  
 /* FIXME: ReactOS will be R-Rated if I really write what I'm about to */
</pre>
</div>

</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic