Closed Bug 519326 Opened 15 years ago Closed 15 years ago

Variant.h(152) : warning C4244: '=' : conversion from 'PRInt64' to 'PRInt32', possible loss of data

Categories

(Toolkit :: Storage, defect)

All
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: mak, Assigned: mak)

Details

Attachments

(1 file)

i always see this warning while compiling with mc

mozilla/storage/Variant.h(152) : warning C4244: '=' : conversion from 'PRInt64' to 'PRInt32', possible loss of data

it should just need a cast, but it's annoying
That's kinda annoying since I'm doing the bounds checking.  If we change that line to |*_result = PRInt32(aValue);| does the error go away?

http://mxr.mozilla.org/mozilla-central/source/storage/src/Variant.h#143
I don't know why gcc let you get away with that. static_cast is the way to go I think.
Attached patch patch v1.0Splinter Review
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Attachment #405079 - Flags: review?(sdwilsh)
Comment on attachment 405079 [details] [diff] [review]
patch v1.0

r=sdwilsh
Attachment #405079 - Flags: review?(sdwilsh) → review+
http://hg.mozilla.org/mozilla-central/rev/cd20b8c48924
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: