Initialize two variables that MSVC /W4 isn't smart enough to realize always get initi...
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Jul 2007 04:53:11 +0000 (04:53 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 1 Jul 2007 04:53:11 +0000 (04:53 +0000)
Reviewed by John.

* editing/Editor.cpp:
(WebCore::Editor::advanceToNextMisspelling):
* html/HTMLParser.cpp:

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

WebCore/ChangeLog
WebCore/editing/Editor.cpp
WebCore/html/HTMLParser.cpp

index 268f8588bdf85a669d60882b99d43d32b23e9c4f..257274877e55df78f693cdb5983b27521c6e4ecf 100644 (file)
@@ -1,5 +1,15 @@
 2007-06-30  Adam Roben  <aroben@apple.com>
 
+        Initialize two variables that MSVC /W4 isn't smart enough to realize always get initialized
+
+        Reviewed by John.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::advanceToNextMisspelling):
+        * html/HTMLParser.cpp:
+
+2007-06-29  Adam Roben  <aroben@apple.com>
+
         Fix some possibly unitialized variables found by MSVC /W4
 
         Reviewed by John.
index cd8ba72b4b5d56207d94a157eb1dc36536faafe5..d5559bb68137065feb3dc6f720d7141ac11de94e 100644 (file)
@@ -1972,7 +1972,7 @@ void Editor::advanceToNextMisspelling(bool startBeforeSelection)
     String badGrammarPhrase;
 
 #ifndef BUILDING_ON_TIGER
-    int grammarPhraseOffset;
+    int grammarPhraseOffset = 0;
     GrammarDetail grammarDetail;
 
     // Search for bad grammar that occurs prior to the next misspelled word (if any)
index a2304aa20f8cbc7784ce35b08d610113ca445042..58cc6df614c059d6bd36ac05e4d3bd6d82e38b56 100644 (file)
@@ -960,7 +960,7 @@ bool HTMLParser::isAffectedByResidualStyle(const AtomicString& tagName)
 
 void HTMLParser::handleResidualStyleCloseTagAcrossBlocks(HTMLStackElem* elem)
 {
-    HTMLStackElem* maxElem;
+    HTMLStackElem* maxElem = 0;
     bool finished = false;
     while (!finished) {
         // Find the outermost element that crosses over to a higher level. If there exists another higher-level