Closed Bug 797229 Opened 13 years ago Closed 13 years ago

Fix two warnings in updater.cpp

Categories

(Toolkit :: Application Update, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

toolkit/mozapps/update/updater/updater.cpp:2035:1 [-Wunused-function] unused function 'ReadMARChannelIDs' toolkit/mozapps/update/updater/updater.cpp:2132:14 [-Wdeprecated-writable-strings] conversion from string literal to 'char *' is deprecated The first one is easy. The second one is technically a bug, since putenv() accepts a char*, not a const char*.
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #667272 - Flags: review?(netzen)
Comment on attachment 667272 [details] [diff] [review] Patch (v1) Review of attachment 667272 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Ehsan Akhgari [:ehsan] from comment #0) > The first one is easy. The second one is technically a bug, since putenv() > accepts a char*, not a const char*. Hrm, is it implementation specific or is one of these 2 documentation pages wrong? http://www.bigbiz.com/cgi-bin/manpage?3+putenv http://linux.die.net/man/3/putenv MSDN also lists it as a const char* btw.
Attachment #667272 - Flags: review?(netzen) → review+
(In reply to comment #2) > Comment on attachment 667272 [details] [diff] [review] > --> https://bugzilla.mozilla.org/attachment.cgi?id=667272 > Patch (v1) > > Review of attachment 667272 [details] [diff] [review]: > ----------------------------------------------------------------- > > (In reply to Ehsan Akhgari [:ehsan] from comment #0) > > The first one is easy. The second one is technically a bug, since putenv() > > accepts a char*, not a const char*. > > Hrm, is it implementation specific or is one of these 2 documentation pages > wrong? > http://www.bigbiz.com/cgi-bin/manpage?3+putenv > http://linux.die.net/man/3/putenv > MSDN also lists it as a const char* btw. Unix defines it as char* <http://pubs.opengroup.org/onlinepubs/009604599/functions/putenv.html>, and both on my Mac and Ubuntu box, it's char*.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: