yarr/MatchResult.h:58:44: warning: overflow in implicit constant conversion [-Woverflow]

RESOLVED FIXED in Firefox 20

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: sstangl)

Tracking

(Blocks: 1 bug)

Trunk
mozilla21
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox20 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
After bug 830676's patch landed, I now get:
{
mozilla/js/src/yarr/MatchResult.h:58:44: warning: overflow in implicit constant conversion [-Woverflow]
}
on my linux 64-bit machine.
(Reporter)

Comment 1

5 years ago
The line of code pointed to is:
> 58         return MatchResult(WTF::notFound, 0);

and bug 830676 changed that MatchResult constructor to take 'int' instead of 'size_t'.

It looks like it changed another usage of notFound to explicitly be converted to an int:
> 63         return start != int(WTF::notFound);

Presumably we want to do add an "int" cast at line 58, too.  Or alternately, as luke suggested in bug 830676 comment 13, we could perhaps change notFound to be already an int.
(Reporter)

Comment 2

5 years ago
(Note: Because this is a build warning in a .h file, we spam multiple instances of this -- one for each .cpp file that ends up #including this file, directly or indirectly.)
(Assignee)

Comment 3

5 years ago
Created attachment 706664 [details] [diff] [review]
fix

This is the fix. Tree is closed, but I've been pinged constantly because that assertion is really annoying, so feel free to push this once the tree opens.

If not, I'll push it tomorrow.
http://hg.mozilla.org/integration/mozilla-inbound/rev/42eb5399753e (with commit-message changes to be slightly more informative :-) )
Assignee: general → sstangl
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/42eb5399753e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 6

5 years ago
Pushed to Aurora:
http://hg.mozilla.org/releases/mozilla-aurora/rev/9c559854783b

Where are the approval flags?
status-firefox20: --- → fixed
(Assignee)

Comment 7

5 years ago
(In reply to Scoobidiver from comment #6)
> Pushed to Aurora:
> http://hg.mozilla.org/releases/mozilla-aurora/rev/9c559854783b
> 
> Where are the approval flags?

In Bug 830676.
You need to log in before you can comment on or make changes to this bug.