'... may be used uninitialized' warning in intl_CompareStrings

RESOLVED FIXED in mozilla27

Status

()

Core
JavaScript: Internationalization API
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jimb, Assigned: jimb)

Tracking

unspecified
mozilla27
All
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 811306 [details] [diff] [review]
Avoid a 'may be used uninitialized' warning.

Specifically:

In file included from ./../../dist/include/js/CallArgs.h:39:0,
                 from ./../../dist/include/js/CallNonGenericMethod.h:12,
                 from /home/jimb/moz/dbg/js/src/NamespaceImports.h:15,
                 from /home/jimb/moz/dbg/js/src/builtin/Intl.h:10,
                 from /home/jimb/moz/dbg/js/src/builtin/Intl.cpp:12:
./../../dist/include/js/Value.h: In function ‘bool js::intl_CompareStrings(JSContext*, unsigned int, JS::Value*)’:
./../../dist/include/js/Value.h:653:58: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     JS_RETURN_LAYOUT_FROM_BITS(((uint64_t)(uint32_t)i32) | JSVAL_SHIFTED_TAG_INT32);
                                                          ^
/home/jimb/moz/dbg/js/src/builtin/Intl.cpp:968:13: note: ‘res’ was declared here
     int32_t res;
             ^
Attachment #811306 - Flags: review?(jwalden+bmo)

Updated

5 years ago
Attachment #811306 - Flags: review?(jwalden+bmo) → review+
(Assignee)

Comment 1

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b85ed93dee3b
Flags: in-testsuite-
Target Milestone: --- → mozilla27

Comment 2

5 years ago
https://hg.mozilla.org/mozilla-central/rev/b85ed93dee3b
Assignee: nobody → jimb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Mass-moving existing Intl-related bugs to the new Core :: JavaScript: Internationalization API component.

If you think this bug has been moved in error, feel free to move it back to Core :: JavaScript Engine.

[Mass change filter: core-js-intl-api-move]
Component: JavaScript Engine → JavaScript: Internationalization API
You need to log in before you can comment on or make changes to this bug.