Bug 1125690 - Fix -Wtautological-compare warning in toolkit/mozapps/update/updater and mark as FAIL_ON_WARNINGS. r=rstrong
authorChris Peterson <cpeterson@mozilla.com>
Sun, 25 Jan 2015 00:24:34 -0800
changeset 253037 8eec3d8ec60a928e55d90bb94a9430a36fc7e64f
parent 253036 2b207b997e4cb0ec06339ac96a74d654b4a19bcf
child 253038 23943d3f9c0e8bb42807a28be948c7a02466589f
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong
bugs1125690
milestone38.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 1125690 - Fix -Wtautological-compare warning in toolkit/mozapps/update/updater and mark as FAIL_ON_WARNINGS. r=rstrong
toolkit/mozapps/update/updater/moz.build
toolkit/mozapps/update/updater/updater.cpp
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -107,8 +107,10 @@ DELAYLOAD_DLLS += [
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 elif CONFIG['OS_ARCH'] == 'WINNT':
     WIN32_EXE_LDFLAGS += ['-municode']
 
 if CONFIG['MOZ_WIDGET_GTK']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
     OS_LIBS += CONFIG['TK_LIBS']
+
+FAIL_ON_WARNINGS = True
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -722,18 +722,19 @@ static int ensure_copy(const NS_tchar *p
 
 template <unsigned N>
 struct copy_recursive_skiplist {
   NS_tchar paths[N][MAXPATHLEN];
 
   void append(unsigned index, const NS_tchar *path, const NS_tchar *suffix) {
     NS_tsnprintf(paths[index], MAXPATHLEN, NS_T("%s/%s"), path, suffix);
   }
+
   bool find(const NS_tchar *path) {
-    for (unsigned i = 0; i < N; ++i) {
+    for (int i = 0; i < static_cast<int>(N); ++i) {
       if (!NS_tstricmp(paths[i], path)) {
         return true;
       }
     }
     return false;
   }
 };