Closed Bug 894240 Opened 11 years ago Closed 11 years ago

jsoptparse.cpp:256:22: error: comparison between pointer and integer ('char *' and 'int')

Categories

(Core :: JavaScript Engine, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

With clang 3.4, in C+11 mode:

js/src/shell/jsoptparse.cpp:256:22: error: comparison between pointer and integer ('char *' and 'int')
        if (value[0] == '\0')
            ~~~~~~~~ ^  ~~~~
1 error generated.

It doesn't complain in non C++11 mode, but i's actually a bug in the code anyways.
Comment on attachment 776213 [details] [diff] [review]
Fix pointer dereference in js::cli::OptionParser::extractValue

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

Swiping, not sure cdleary is reading bugmail or review-mail overmuch these days...
Attachment #776213 - Flags: review?(cdleary) → review+
https://hg.mozilla.org/mozilla-central/rev/1469a9e83e2d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: