Closed Bug 505714 Opened 15 years ago Closed 15 years ago

nsCanvasRenderingContext2D.cpp compilation failure on MinGW.

Categories

(Core :: Graphics: Canvas2D, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 509188

People

(Reporter: jacek, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: 

On MinGW jsint is typedefed to long and PRInt32 to int, so I get errors:

content/canvas/src/nsCanvasRenderingContext2D.cpp: In member function `virtual nsresult nsCanvasRenderingContext2D::PutImageData()':
content/canvas/src/nsCanvasRenderingContext2D.cpp:3630: error: call of overloaded `ToUint8(jsint)' is ambiguous
content/canvas/src/nsCanvasRenderingContext2D.cpp:3508: note: candidates are: PRUint8 ToUint8(PRInt32)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3515: note:                 PRUint8 ToUint8(double)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3634: error: call of overloaded `ToUint8(jsint)' is ambiguous
content/canvas/src/nsCanvasRenderingContext2D.cpp:3508: note: candidates are: PRUint8 ToUint8(PRInt32)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3515: note:                 PRUint8 ToUint8(double)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3638: error: call of overloaded `ToUint8(jsint)' is ambiguous
content/canvas/src/nsCanvasRenderingContext2D.cpp:3508: note: candidates are: PRUint8 ToUint8(PRInt32)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3515: note:                 PRUint8 ToUint8(double)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3642: error: call of overloaded `ToUint8(jsint)' is ambiguous
content/canvas/src/nsCanvasRenderingContext2D.cpp:3508: note: candidates are: PRUint8 ToUint8(PRInt32)
content/canvas/src/nsCanvasRenderingContext2D.cpp:3515: note:                 PRUint8 ToUint8(double)

To fix it we can ToUint8 to get jsint as an argument.

Reproducible: Always
Attached patch FixSplinter Review
Attachment #389926 - Flags: review?(vladimir)
Fixed by
http://hg.mozilla.org/mozilla-central/rev/a2c2235ca124
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #389926 - Flags: review?(vladimir)
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: