Closed
Bug 453094
Opened 18 years ago
Closed 17 years ago
Some strong type conversion make GCC not complain
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: Techrazy.Yang, Assigned: Techrazy.Yang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
|
1.34 KB,
patch
|
jorendorff
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
I add these strong type conversion which make mingw GCC not complain...
Attachment #336311 -
Flags: review?(shaver)
Updated•18 years ago
|
Attachment #336311 -
Flags: review?(shaver) → review?(jorendorff)
Comment 1•18 years ago
|
||
Comment on attachment 336311 [details] [diff] [review]
The trivial patch
I'm not a good reviewer for this patch. I recommend jorendorff.
Comment 2•18 years ago
|
||
Comment on attachment 336311 [details] [diff] [review]
The trivial patch
Thanks for posting this.
> - chars = (len == 0 ? traits::sEmptyBuffer : JS_GetStringChars(s));
> - new(mBuf) implementation_type(chars, len);
> + chars = (len == 0 ?
> + (jschar*) traits::sEmptyBuffer : JS_GetStringChars((JSString*)s));
> + new(mBuf) implementation_type((const PRUnichar*)chars, len);
Only one cast should be needed, I think. Change the type of chars to const PRUnichar *.
The cast (JSString*)s looks redundant to me.
> - *pstr = JS_GetStringChars(str);
> + *pstr = (PRUnichar*)JS_GetStringChars((JSString*)str);
Here too.
Attachment #336311 -
Flags: review?(jorendorff)
Attachment #336311 -
Attachment is obsolete: true
Attachment #336598 -
Flags: review?(jorendorff)
Comment 5•18 years ago
|
||
Comment on attachment 336598 [details] [diff] [review]
The second version
Ack! I'm sorry I missed this. Please change the type of chars to const PRUnichar * though.
Attachment #336598 -
Flags: review?(jorendorff)
Do you mean this way?
Attachment #336598 -
Attachment is obsolete: true
Attachment #339743 -
Flags: review?(jorendorff)
Comment 7•18 years ago
|
||
Comment on attachment 339743 [details] [diff] [review]
Third version
[Checkin: Comment 9]
Yep, that's the way.
Attachment #339743 -
Flags: review?(jorendorff) → review+
Updated•18 years ago
|
Attachment #339743 -
Flags: superreview?(peterv)
Updated•18 years ago
|
Attachment #339743 -
Flags: superreview?(peterv) → superreview+
Comment 8•17 years ago
|
||
It's already reviewed two months ago and still applies cleanly.
Keywords: checkin-needed
Updated•17 years ago
|
Assignee: nobody → Techrazy.Yang
Comment 9•17 years ago
|
||
Comment on attachment 339743 [details] [diff] [review]
Third version
[Checkin: Comment 9]
http://hg.mozilla.org/mozilla-central/rev/f03a67ca2772
Attachment #339743 -
Attachment description: Third version → Third version
[Checkin: Comment 9]
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•