Fix two typos spotted by MSVC /W3
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2007 17:50:05 +0000 (17:50 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2007 17:50:05 +0000 (17:50 +0000)
Both typos were a semicolon following the condition of an if. This
would cause the intended body of the if to always execute.

Unfortunately neither of these fixes are testable.
BackForwardList::goForward is only called from WebBackForwardList, and
the createDragImageFromImage bug would only manifest itself when
CreateCompatibleDC failed.

Reviewed by Mark.

* history/BackForwardList.cpp:
(WebCore::BackForwardList::goForward):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageFromImage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/history/BackForwardList.cpp
WebCore/platform/win/DragImageWin.cpp

index 48a658cf77aa81620871acdf177af7f5c55b9524..642f196f28777d5de5287267b2fd50f06e0c4174 100644 (file)
@@ -1,3 +1,22 @@
+2007-06-29  Adam Roben  <aroben@apple.com>
+
+        Fix two typos spotted by MSVC /W3
+
+        Both typos were a semicolon following the condition of an if. This
+        would cause the intended body of the if to always execute.
+
+        Unfortunately neither of these fixes are testable.
+        BackForwardList::goForward is only called from WebBackForwardList, and
+        the createDragImageFromImage bug would only manifest itself when
+        CreateCompatibleDC failed.
+
+        Reviewed by Mark.
+
+        * history/BackForwardList.cpp:
+        (WebCore::BackForwardList::goForward):
+        * platform/win/DragImageWin.cpp:
+        (WebCore::createDragImageFromImage):
+
 2007-06-29  Adam Treat  <adam@staikos.net>
 
         Reviewed by george Staikos.
index 653a5e2e6ed65973a8486cf237ca39be6f515480..560f90fce427805fd4037938716cc357860aa0f7 100644 (file)
@@ -93,7 +93,7 @@ void BackForwardList::goBack()
 void BackForwardList::goForward()
 {
     ASSERT(m_current < m_entries.size() - 1);
-    if (m_current < m_entries.size() - 1);
+    if (m_current < m_entries.size() - 1)
         m_current++;
 }
 
index 2230bc56864b2dd34357e1bff36440afb1636e83..d4b7281ffa079eec92028d057fab31e2ab210cbe 100644 (file)
@@ -178,7 +178,7 @@ DragImageRef createDragImageFromImage(Image* img)
     CGContextRelease(drawContext);
 
 exit:
-    if (workingDC);
+    if (workingDC)
         DeleteDC(workingDC);
     ReleaseDC(0, dc);
     return hbmp;