Closed Bug 139343 Opened 22 years ago Closed 22 years ago

Clean up build warnings in nsComputedDOMStyle, nsROCSSPrimitiveValue

Categories

(Core :: DOM: CSS Object Model, defect, P4)

x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED
mozilla1.1alpha

People

(Reporter: caillon, Assigned: caillon)

References

Details

Attachments

(1 file, 1 obsolete file)

Jst pinged me about these warnings he got.  They look harmless but we should
clean them up anyway.

nsComputedDOMStyle.cpp
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(1675) : warning
C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(1788) : warning
C4244: 'argument' : conversion from 'int' to 'float', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(1838) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(1968) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(2279) : warning
C4244: 'argument' : conversion from 'unsigned int' to 'float', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3012) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3076) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3121) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3169) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3787) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
e:\clean\mozilla\content\html\style\src\nsComputedDOMStyle.cpp(3791) : warning
C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
Attached patch Proposed patch v1.0 (obsolete) — Splinter Review
I need someone to test this out since I don't see those warnings... jst?  :)
The warnings go away with this patch using gcc 3.0.4 on FreeBSD. I have not
tested any functionality, just building.
Comment on attachment 80605 [details] [diff] [review]
Proposed patch v1.0

Actually, should we have a SetTwips(float) that converts to nscoord?
Sounds good to me....
Attached patch Alternate patchSplinter Review
Smaller patch.	Adds SetTwips(float aValue) to the RO PrimitiveValue so we
don't need to keep adding nscoord(foo) to computed style in the future.
Severity: normal → trivial
Status: NEW → ASSIGNED
Priority: -- → P4
Summary: Clean up build warnings in nsComputedDOMStyle.cpp → Clean up build warnings in nsComputedDOMStyle, nsROCSSPrimitiveValue
Target Milestone: --- → mozilla1.1alpha
Comment on attachment 80676 [details] [diff] [review]
Alternate patch

sr=jst
Attachment #80676 - Flags: superreview+
Comment on attachment 80676 [details] [diff] [review]
Alternate patch

r=bzbarsky

Death to build warnings!
Attachment #80676 - Flags: review+
Fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Attachment #80605 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: