Closed Bug 13469 Opened 25 years ago Closed 25 years ago

Lots of warnings in nsHTMLEditRules.cpp

Categories

(Core :: DOM: Editor, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: akkzilla, Assigned: mozeditor)

Details

Filing this as a reminder to Joe to please clean up his pile of warnings that
make it hard to find new warnings in this file.

nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::WillMakeList(class
nsIDOMSelection *, PRBool, PRBool *)':
nsHTMLEditRules.cpp:699: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp:709: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp:710: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::WillRemoveList(class
nsIDOMSelection *, PRBool, PRBool *)':
nsHTMLEditRules.cpp:866: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::WillIndent(class
nsIDOMSelection *, PRBool *)':
nsHTMLEditRules.cpp:994: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::WillOutdent(class
nsIDOMSelection *, PRBool *)':
nsHTMLEditRules.cpp:1096: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::WillAlign(class
nsIDOMSelection *, const class nsString *, PRBool *)':
nsHTMLEditRules.cpp:1216: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::IsEmptyBlock(class
nsIDOMNode *, PRBool *)':
nsHTMLEditRules.cpp:1481: warning: unused variable `nsresult res'
nsHTMLEditRules.cpp: In method `PRBool nsHTMLEditRules::IsLastNode(class
nsIDOMNode *)':
nsHTMLEditRules.cpp:1626: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp:1634: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult
nsHTMLEditRules::GetNodesForOperation(class nsISupportsArray *, class
nsCOMPtr<nsISupportsArray> *, PRInt32)':
nsHTMLEditRules.cpp:1875: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult
nsHTMLEditRules::MakeTransitionList(class nsISupportsArray *, class nsVoidArray
*)':
nsHTMLEditRules.cpp:1959: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::ApplyBlockStyle(class
nsISupportsArray *, const class nsString *)':
nsHTMLEditRules.cpp:2554: warning: declaration of `curNode' shadows previous
local
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::JoinNodesSmart(class
nsIDOMNode *, class nsIDOMNode *, class nsCOMPtr<nsIDOMNode> *, PRInt32 *)':
nsHTMLEditRules.cpp:2751: warning: value computed is not used
nsHTMLEditRules.cpp: In method `nsresult nsHTMLEditRules::CleanUpSelection(class
nsIDOMSelection *)':
nsHTMLEditRules.cpp:2821: warning: comparison between signed and unsigned
nsHTMLEditRules.cpp:2864: warning: comparison between signed and unsigned
Status: NEW → ASSIGNED
accepting bug; cc'ing akkana
setting to m11
Target Milestone: M11
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fixed.
AKkana/Joe please mark this one VERIFIED...thanks!
Status: RESOLVED → REOPENED
Well, almost ... there's one more:

nsHTMLEditRules.cpp:2854: warning: value computed is not used

That line is:
      *aOutMergeOffset++;   // out offset _after_ <br>
I tried changing it to
      (*aOutMergeOffset)++;   // out offset _after_ <br>
and the warning went away, which makes me think that maybe the compiler isn't
doing the same precedence Joe thinks it is.  Because of this, I'm hesitant to
just check in this change; Joe should make the decision as to what he wants the
precedence to be.  This sounds dangerous so I'm reopening even though it's only
one warning.
thanks for catching this Akkana.  as it happens i had caught it earlier, and then
gotten interrupted right after I looked up the precedence and forgot all about
it.  I believe the code is wrong; the warning indicates a problem; and I'll fix
it with some parens.  Shame on me for not using the parens to start with,
especially since I preach their use even when they aren't strictly needed.
Resolution: FIXED → ---
Clearing FIXED resolution due to reopen of this bug.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
fixed
Akkana/Joe, please mark verirfied fixed...thanks!
Status: RESOLVED → VERIFIED
Yup, no warnings left.  Thanks!
You need to log in before you can comment on or make changes to this bug.