Closed
Bug 609710
Opened 14 years ago
Closed 12 years ago
TestStartupCache.cpp has build warnings for deprecated conversion from string constant to 'char*'
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: dholbert, Assigned: froydnj)
References
(Blocks 1 open bug)
Details
(Whiteboard: [build_warning])
Attachments
(1 file, 2 obsolete files)
2.94 KB,
patch
|
froydnj
:
review+
froydnj
:
feedback+
|
Details | Diff | Splinter Review |
The fairly-recently-added file TestStartupCache.cpp spams 13 lines of GCC build warnings when compiled:
> startupcache/test/TestStartupCache.cpp: In function 'nsresult TestStartupWriteRead()':
> startupcache/test/TestStartupCache.cpp:116: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp:117: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp: In function 'nsresult TestWriteInvalidateRead()':
> startupcache/test/TestStartupCache.cpp:145: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp:146: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp: In function 'nsresult TestWriteObject()':
> startupcache/test/TestStartupCache.cpp:194: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp: In function 'nsresult TestEarlyShutdown()':
> startupcache/test/TestStartupCache.cpp:285: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp:286: warning: deprecated conversion from string constant to 'char*'
> startupcache/test/TestStartupCache.cpp: In function 'int main(int, char**)':
> startupcache/test/TestStartupCache.cpp:320: warning: unused variable 'rv2'
Filing this bug on fixing these.
Updated•13 years ago
|
Blocks: buildwarning
Assignee | ||
Comment 1•12 years ago
|
||
Trivial patch. The constantification of variables is a no brainer; the ugly bit is the necessity of using const_cast, but that is required by the generated IDL headers, so...
Assignee | ||
Updated•12 years ago
|
Summary: TestStartupCache.cpp has build warnings for deprecated conversion from string constant to 'char*' and unused variable → TestStartupCache.cpp has build warnings for deprecated conversion from string constant to 'char*'
Updated•12 years ago
|
Attachment #584763 -
Flags: review?(mwu) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 2•12 years ago
|
||
The nsIStartupCache interface is provided for testing purposes only, and StartupCache::PutBuffer takes a const char*. We should just fix the IDL.
Keywords: checkin-needed
Assignee | ||
Comment 3•12 years ago
|
||
Ms2ger, is this what you had in mind? I can't carryover mwu's r+, so re-r?'ing him.
Attachment #584763 -
Attachment is obsolete: true
Attachment #584788 -
Flags: review?(mwu)
Attachment #584788 -
Flags: review?(Ms2ger)
Comment 4•12 years ago
|
||
Comment on attachment 584788 [details] [diff] [review] fix warnings, v2 Yes, looks good. Thanks.
Attachment #584788 -
Flags: review?(Ms2ger) → feedback+
Comment 5•12 years ago
|
||
Comment on attachment 584788 [details] [diff] [review] fix warnings, v2 Even better. Just rev the uuid when you check this in.
Attachment #584788 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Rev'ing UUID, carrying over +'s.
Attachment #584788 -
Attachment is obsolete: true
Attachment #584845 -
Flags: review+
Attachment #584845 -
Flags: feedback+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/092e88ea2eb7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in
before you can comment on or make changes to this bug.
Description
•