Closed
Bug 190801
Opened 23 years ago
Closed 23 years ago
TestXPTCInvoke violates xpcom for outparams and should pass its char*s as const
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 file)
|
2.09 KB,
patch
|
dougt
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 235: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 742: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 742: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 765: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 765: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 800: Warning: String literal converted to char* in
initialization.
"/export/home/timeless/mozilla/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp",
line 800: Warning: String literal converted to char* in
initialization.
Attachment #112762 -
Flags: superreview?(roc+moz)
Attachment #112762 -
Flags: review?(dougt)
Attachment #112762 -
Flags: superreview?(roc+moz) → superreview+
Comment 2•23 years ago
|
||
Comment on attachment 112762 [details] [diff] [review]
fix
nit - please treat sizeof as a function and use Parenthesis:
+ const char milk[] = "milk";
+ char *ret = (char*)nsMemory::Alloc(sizeof milk);
sizeof milk
okay.
Attachment #112762 -
Flags: review?(dougt) → review+
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•