Bug 1310399 - Fix -Wshadow warning in widget/nsBaseWidget.cpp. r=jimm
authorChris Peterson <cpeterson@mozilla.com>
Mon, 17 Oct 2016 22:37:52 -0700
changeset 318382 e49dd361aa99e33ec32f5cb5a9e1b5460cc7de1c
parent 318381 920b7ef4a36933cf358af307100f8adf6f4df594
child 318383 81c68abc4f5e795131c48451bbae55ee93f6791a
push id30839
push userphilringnalda@gmail.com
push dateWed, 19 Oct 2016 02:36:31 +0000
treeherdermozilla-central@90d8afaddf91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1310399
milestone52.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 1310399 - Fix -Wshadow warning in widget/nsBaseWidget.cpp. r=jimm widget/nsBaseWidget.cpp:1970:14 [-Wshadow] declaration shadows a local variable
widget/moz.build
widget/nsBaseWidget.cpp
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -279,11 +279,8 @@ LOCAL_INCLUDES += [
     '/widget/%s' % widget_dir,
 ]
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
     DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wno-error=shadow']
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1962,19 +1962,18 @@ nsIWidget::SynthesizeNativeTouchTap(Layo
   sPointerIdCounter++;
   nsresult rv = SynthesizeNativeTouchPoint(pointerId, TOUCH_CONTACT,
                                            aPoint, 1.0, 90, nullptr);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   if (!aLongTap) {
-    nsresult rv = SynthesizeNativeTouchPoint(pointerId, TOUCH_REMOVE,
-                                             aPoint, 0, 0, nullptr);
-    return rv;
+    return SynthesizeNativeTouchPoint(pointerId, TOUCH_REMOVE,
+                                      aPoint, 0, 0, nullptr);
   }
 
   // initiate a long tap
   int elapse = Preferences::GetInt("ui.click_hold_context_menus.delay",
                                    TOUCH_INJECT_LONG_TAP_DEFAULT_MSEC);
   if (!mLongTapTimer) {
     mLongTapTimer = do_CreateInstance(NS_TIMER_CONTRACTID, &rv);
     if (NS_FAILED(rv)) {