Closed
Bug 502296
Opened 16 years ago
Closed 16 years ago
TM: warnings in jsxdrapi.cpp
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
|
1.63 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
../jsxdrapi.cpp: In function ‘JSBool JS_XDRDouble(JSXDRState*, jsdouble**)’:
../jsxdrapi.cpp:508: warning: ‘d’ may be used uninitialized in this function
../jsxdrapi.cpp: In function ‘JSBool XDRValueBody(JSXDRState*, uint32, jsval*)’:
../jsxdrapi.cpp:508: warning: ‘d’ may be used uninitialized in this function
../jsxdrapi.cpp:547: warning: ‘dp’ may be used uninitialized in this function
../jsxdrapi.cpp: In function ‘JSBool js_XDRAtom(JSXDRState*, JSAtom**)’:
../jsxdrapi.cpp:497: warning: ‘d’ is used uninitialized in this function
| Assignee | ||
Comment 1•16 years ago
|
||
Assignee: general → gal
| Assignee | ||
Updated•16 years ago
|
Attachment #386780 -
Flags: review?(jwalden+bmo)
Comment 2•16 years ago
|
||
Comment on attachment 386780 [details] [diff] [review]
shutup gcc (might me a tiny overhead, but its not a really relevant path)
>diff --git a/js/src/jsxdrapi.cpp b/js/src/jsxdrapi.cpp
> JS_PUBLIC_API(JSBool)
> JS_XDRDouble(JSXDRState *xdr, jsdouble **dpp)
> {
> jsdouble d;
>
>- if (xdr->mode == JSXDR_ENCODE)
>- d = **dpp;
>+ d = (xdr->mode == JSXDR_ENCODE) ? **dpp : 0.0;
> case JSVAL_DOUBLE: {
> jsdouble *dp;
>- if (xdr->mode == JSXDR_ENCODE)
>- dp = JSVAL_TO_DOUBLE(*vp);
>+ dp = (xdr->mode == JSXDR_ENCODE) ? JSVAL_TO_DOUBLE(*vp) : NULL;
> if (!JS_XDRDouble(xdr, &dp))
Unify declaration and assignment while you're here.
Attachment #386780 -
Flags: review?(jwalden+bmo) → review+
| Assignee | ||
Comment 3•16 years ago
|
||
Pushed with the nit above addressed.
http://hg.mozilla.org/tracemonkey/rev/9cb0da88df44
Severity: normal → trivial
Priority: -- → P3
Whiteboard: fixed-in-tracemonkey
Comment 4•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•