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)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

Details

Attachments

(1 file)

"/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.
Attached patch fixSplinter Review
Attachment #112762 - Flags: superreview?(roc+moz)
Attachment #112762 - Flags: review?(dougt)
Attachment #112762 - Flags: superreview?(roc+moz) → superreview+
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.

Attachment

General

Creator:
Created:
Updated:
Size: