Closed Bug 829112 Opened 13 years ago Closed 13 years ago

Fix "comparison between signed and unsigned integer expressions" warnings in nsStyleSet.cpp

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

nsStyleSet.cpp has a bunch of build warnings from using a signed variable as a loop-iterator, which we compare to an unsigned 'count' variable in the loop condition. { layout/style/nsStyleSet.cpp: In member function ‘nsresult nsStyleSet::GatherRuleProcessors(nsStyleSet::sheetType)’: layout/style/nsStyleSet.cpp:298:62: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] layout/style/nsStyleSet.cpp:335:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] layout/style/nsStyleSet.cpp: In member function ‘void nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc, RuleProcessorData*, mozilla::dom::Element*, nsRuleWalker*)’: layout/style/nsStyleSet.cpp:964:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] layout/style/nsStyleSet.cpp: In member function ‘void nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc, ElementDependentRuleProcessorData*, bool)’: layout/style/nsStyleSet.cpp:1113:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] }
Blocks: buildwarning
OS: Linux → All
Hardware: x86_64 → All
Attached patch fix v1Splinter Review
This makes nsStyleSet.cpp compile w/ no build warnings at all, FWIW. (woot)
Attachment #700520 - Flags: review?(bzbarsky)
Attachment #700520 - Flags: review?(bzbarsky) → review+
Blocks: 829168
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: