Closed Bug 1209636 Opened 5 years ago Closed 5 years ago

nsMsgUtils.cpp(512): warning C4305: '=': truncation from 'double' to 'float'

Categories

(MailNews Core :: Backend, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 44.0

People

(Reporter: ssitter, Assigned: ssitter)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch assign a float type literal (obsolete) — Splinter Review
I want to see less warnings in my build output
mailnews/base/util/nsMsgUtils.cpp(512): warning C4305: '=': truncation from 'double' to 'float'
Attachment #8667413 - Flags: review?(rkent)
Comment on attachment 8667413 [details] [diff] [review]
assign a float type literal

Review of attachment 8667413 [details] [diff] [review]:
-----------------------------------------------------------------

Really the right way to fix this is to change to declaration to double. Please do that. I don't need to see it again, r=me with the alternate approach.

::: mailnews/base/util/nsMsgUtils.cpp
@@ +504,2 @@
>  
>    float unitSize = size < 0 ? 0.0 : size;

change the declaration to double

@@ +508,5 @@
>    if (useKB) {
>      // Start by formatting in kilobytes
>      unitSize /= 1024;
>      if (unitSize < 0.1 && unitSize != 0)
> +      unitSize = 0.1f;

Leave this alone
Attachment #8667413 - Flags: review?(rkent) → review+
change type to double and take over r=rkent from comment #1
Attachment #8667413 - Attachment is obsolete: true
Attachment #8667543 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/6bf59a6939019bbcfcf049abfb886fd60f3f9019
Bug 1209636 - Fix warning C4305: '=': truncation from 'double' to 'float'. r=rkent
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 44.0
You need to log in before you can comment on or make changes to this bug.