Possible typo in gfx/src/nsGraphicsImpl.cpp since rev 1.1

VERIFIED FIXED in mozilla0.9.1

Status

Core Graveyard
GFX
P3
trivial
VERIFIED FIXED
18 years ago
9 years ago

People

(Reporter: Hallvard B Furuseth, Assigned: Kevin McCluskey (gone))

Tracking

Trunk
mozilla0.9.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

18 years ago
Gcc warns about the line
  size *= mDev2App;
which actually does
  size *= (nscoord) mDev2App; // cast floating to integer
but looks like (and is maybe meant to do)
  size =  (nscoord) (size * mDev2App);
because size is integral and mDev2App floating.

Anyway, to kill the warning, spell it out as one of these.
->Compositor
Assignee: asa → kmcclusk
Status: UNCONFIRMED → NEW
Component: Browser-General → Compositor
Ever confirmed: true
QA Contact: doronr → petersen
(Reporter)

Comment 2

18 years ago
Sorry, I should've know better than to submit a report just before
I rushed out the door...  What happens is exactly the opposite of
what I said.  Don't know how I managed to twist the output to show
the opposite.
Oh well, at least the proposed change does kill off a warning.
Severity: minor → trivial
(Assignee)

Updated

18 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 3

17 years ago
Setting milestone to mozilla1.0.1
Reassigning to Waqar.
Assignee: kmcclusk → waqar
Status: ASSIGNED → NEW
Target Milestone: --- → mozilla1.0.1
(Assignee)

Comment 4

17 years ago
Created attachment 31226 [details] [diff] [review]
Patch to fix warning
(Assignee)

Comment 5

17 years ago
Taking this bug
Assignee: waqar → kmcclusk
Target Milestone: mozilla1.0.1 → mozilla0.9.1

Comment 6

17 years ago
NS_STATIC_CAST instead of direct c-style caset maybe? sr=attinasi
(Assignee)

Comment 7

17 years ago
Created attachment 32776 [details] [diff] [review]
New patch that using NS_STATIC_CAST

Comment 8

17 years ago
looks good.
r=dcone
(Reporter)

Comment 9

17 years ago
Last patch, unlike the first one, changes <size>'s new value from
   (nscoord) (size * mDev2App)
to
   size * (nscoord) mDev2App
I hope that was intentional.

This bug has had me wishing for a cancel button for silly Bugzilla reports:-(
(Assignee)

Comment 10

17 years ago
Created attachment 32937 [details] [diff] [review]
New patch for warning which using NS_STATIC and does the calculation correctly
(Assignee)

Comment 11

17 years ago
Fix checked in
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 12

17 years ago
Marking verified in the May 30th build.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.