Closed
Bug 68992
Opened 24 years ago
Closed 16 years ago
nsMessenger::DoCommand should take const char*, not char*
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: bbaetz, Unassigned)
References
()
Details
naving's checkin to nsMessenger broke senna and monkeypox - see the URL for the patch which was checked in to fix this. g++ correctly uses the deprecated implicit conversion from a string literal to a char*, but for the bool?"foo":"bar" case, gcc takes the strings as a const char*. I have no idea if thats a gcc bug or not - but the online CVS gcc snapshot (www.codesourcery.com) gave the same error for a simple test case. All other callers of DoCommand which use the ?: form use a (char*) cast for each argument. Is there a reason that the 2nd argument to DoCommand doesn't take a const char*? Its a protected method, and I can't see anything which inherits from nsMessenger. (If this is done, all the explicit casts should be removed). The implicit conversion is deprecated, and writing to the constant strings will probably cause a crash, so this should probably be done anyway.
Comment 1•24 years ago
|
||
Yes I had kept const char* but later on got removed by review. I will be more careful next time. Thanks for the checkin.
Comment 2•24 years ago
|
||
So this was fixed? If it was, then mark it fixed.
Reporter | ||
Comment 3•24 years ago
|
||
No, it wasn't fixed. See the dependant bug.
Updated•20 years ago
|
Product: MailNews → Core
Comment 5•17 years ago
|
||
sorry for the spam. making bugzilla reflect reality as I'm not working on these bugs. filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Comment 6•16 years ago
|
||
The call to DoCommand no longer exists, therefore closing invalid.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•