Bug 1190148 - Fix warnings in toolkit/crashreporter/client and mark as FAIL_ON_WARNINGS. r=ted
authorChris Peterson <cpeterson@mozilla.com>
Sat, 01 Aug 2015 11:59:40 -0700
changeset 258684 53950d5bdf720aa07691b40833bfc5fa842eab97
parent 258683 507a508aea70492612e68de51d531e7599246a64
child 258685 6ae039c4a0b4a432f7b611a61f43dd75ca5aa437
push id64012
push usercpeterson@mozilla.com
push dateFri, 21 Aug 2015 06:20:07 +0000
treeherdermozilla-inbound@6ae039c4a0b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1190148
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1190148 - Fix warnings in toolkit/crashreporter/client and mark as FAIL_ON_WARNINGS. r=ted
toolkit/crashreporter/client/crashreporter_gtk_common.cpp
toolkit/crashreporter/client/crashreporter_osx.mm
toolkit/crashreporter/client/moz.build
--- a/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
+++ b/toolkit/crashreporter/client/crashreporter_gtk_common.cpp
@@ -404,27 +404,25 @@ bool UIMoveFile(const string& file, cons
   // use system /bin/mv instead, time to fork
   pid_t pID = vfork();
   if (pID < 0) {
     // Failed to fork
     return false;
   }
   if (pID == 0) {
     char* const args[4] = {
-      "mv",
+      const_cast<char*>("mv"),
       strdup(file.c_str()),
       strdup(newfile.c_str()),
       0
     };
     if (args[1] && args[2])
       execve("/bin/mv", args, 0);
-    if (args[1])
-      free(args[1]);
-    if (args[2])
-      free(args[2]);
+    free(args[1]);
+    free(args[2]);
     exit(-1);
   }
   int status;
   waitpid(pID, &status, 0);
   return UIFileExists(newfile);
 }
 
 bool UIDeleteFile(const string& file)
--- a/toolkit/crashreporter/client/crashreporter_osx.mm
+++ b/toolkit/crashreporter/client/crashreporter_osx.mm
@@ -274,17 +274,17 @@ static bool RestartApplication()
 
 -(IBAction)viewReportClicked:(id)sender
 {
   [self showReportInfo];
   [NSApp beginSheet:mViewReportWindow modalForWindow:mWindow
    modalDelegate:nil didEndSelector:nil contextInfo:nil];
 }
 
-- (IBAction)viewReportOkClicked:(id)sender;
+- (IBAction)viewReportOkClicked:(id)sender
 {
   [mViewReportWindow orderOut:nil];
   [NSApp endSheet:mViewReportWindow];
 }
 
 -(IBAction)closeClicked:(id)sender
 {
   [self maybeSubmitReport];
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -68,8 +68,10 @@ if CONFIG['MOZ_ENABLE_GTK']:
 
 RCINCLUDE = 'crashreporter.rc'
 
 # Don't use the STL wrappers in the crashreporter clients; they don't
 # link with -lmozalloc, and it really doesn't matter here anyway.
 DISABLE_STL_WRAPPING = True
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
+
+FAIL_ON_WARNINGS = True