Closed Bug 605177 Opened 11 years ago Closed 11 years ago

Fix build warnings in editor/

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v1 (obsolete) — Splinter Review
No description provided.
Flags: in-testsuite-
Attachment #484013 - Flags: review?(ehsan)
Comment on attachment 484013 [details] [diff] [review]
Patch v1

>diff --git a/editor/txtsvc/src/nsTextServicesDocument.cpp b/editor/txtsvc/src/nsTextServicesDocument.cpp
>-  PRInt32 nodeIndex, tcount;
>-  PRBool hasEntry;
>+  PRInt32 tcount;
>+  PRInt32 nodeIndex = 0;
>+  PRBool hasEntry = PR_FALSE;

Why are you not initializing tcount as well?

Looks good otherwise.
Attachment #484013 - Flags: review?(ehsan)
Because tcount is initialized unconditionally later in the function. How about

@@ -1846,1 +1847,1 @@
-tcount = mOffsetTable.Length();
+PRInt32 tcount = mOffsetTable.Length();

instead?
Attachment #484013 - Flags: review?(ehsan)
Comment on attachment 484013 [details] [diff] [review]
Patch v1

(In reply to comment #2)
> Because tcount is initialized unconditionally later in the function. How about
> 
> @@ -1846,1 +1847,1 @@
> -tcount = mOffsetTable.Length();
> +PRInt32 tcount = mOffsetTable.Length();
> 
> instead?

That makes more sense.  r=me with that change.
Attachment #484013 - Flags: review?(ehsan) → review+
Attached patch Patch v2Splinter Review
Done.
Attachment #484013 - Attachment is obsolete: true
Attachment #485136 - Flags: approval2.0?
Attachment #485136 - Flags: approval2.0? → approval2.0+
Temporarily assigning to me so that this patch shows up in my "needs landing" query.  Will assign back to Ms2ger once I land this.
Assignee: Ms2ger → ehsan
Whiteboard: [build_warning] → [build_warning][needs landing]
http://hg.mozilla.org/mozilla-central/rev/8f95ff16a6ba
Assignee: ehsan → Ms2ger
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning][needs landing] → [build_warning]
Target Milestone: --- → mozilla2.0b8
Duplicate of this bug: 577907
You need to log in before you can comment on or make changes to this bug.