Closed
Bug 563849
Opened 14 years ago
Closed 14 years ago
nsWaveDecoder.cpp: warning C4244: conversion from [TYPE] to [TYPE], possible loss of data
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
References
()
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
6.36 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
{
> nsWaveDecoder.cpp
> content/media/wave/nsWaveDecoder.cpp(588) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
> content/media/wave/nsWaveDecoder.cpp(607) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
> content/media/wave/nsWaveDecoder.cpp(648) : warning C4244: 'initializing' : conversion from 'PRInt64' to 'PRUint32', possible loss of data
> content/media/wave/nsWaveDecoder.cpp(950) : warning C4244: 'argument' : conversion from 'PRInt64' to 'PRUint32', possible loss of data
}
The first two are from calls to TimeToBytes, which takes a float, whereas the calls pass in a double.
The third is for the initialization of a PRUint32 value from (an operation involving) the PRInt64 value |got|.
The fourth is for the initialization of a PRUint32 value from (an operation involving) the PRInt64 value |aSize|.
In all cases, I've just made the casts explicit to silence the warnings.
I've also done s/0.0/0.0f/ & s/1.0/1.0f/ for numeric literals that are compared vs. a float variable (otherwise those literals are implicitly treated as doubles), and I've cleaned up a few contextual lines that were > 80 chars.
Attachment #443540 -
Flags: review?(kinetik)
Assignee | ||
Updated•14 years ago
|
OS: Linux → Windows NT
Comment 1•14 years ago
|
||
Comment on attachment 443540 [details] [diff] [review] fix Thanks!
Attachment #443540 -
Flags: review?(kinetik) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Your welcome, thanks for the quick review! Pushed: http://hg.mozilla.org/mozilla-central/rev/94d4aa4dc42f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•14 years ago
|
||
(In reply to comment #2) > Your welcome, thanks for the quick review! *facepalm* s/Your/You're/
Assignee | ||
Updated•14 years ago
|
Whiteboard: [build_warning]
You need to log in
before you can comment on or make changes to this bug.
Description
•