Bug 1166741 followup: Guard GTK file-picker member-var decl/init statements with same #ifdef that its usages are guarded with, to avoid -Wunused-private-field warning. r=karlt
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 26 May 2015 22:40:28 -0700
changeset 245775 14f0933c537c26fb26050fb952fdd94c48756969
parent 245774 5a6a4ced599be299eac0440bfbf4154c0749a836
child 245776 da5bcffc250245b6c8be151657cceabbe0708a36
push id28816
push userkwierso@gmail.com
push dateThu, 28 May 2015 00:03:18 +0000
treeherdermozilla-central@8707d35414f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1166741
milestone41.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 1166741 followup: Guard GTK file-picker member-var decl/init statements with same #ifdef that its usages are guarded with, to avoid -Wunused-private-field warning. r=karlt
widget/gtk/nsFilePicker.cpp
widget/gtk/nsFilePicker.h
--- a/widget/gtk/nsFilePicker.cpp
+++ b/widget/gtk/nsFilePicker.cpp
@@ -158,20 +158,22 @@ MakeCaseInsensitiveShellGlob(const char*
   }
 
   return result;
 }
 
 NS_IMPL_ISUPPORTS(nsFilePicker, nsIFilePicker)
 
 nsFilePicker::nsFilePicker()
-  : mSelectedType(0),
-    mRunning(false),
-    mAllowURLs(false),
-    mFileChooserDelegate(nullptr)
+  : mSelectedType(0)
+  , mRunning(false)
+  , mAllowURLs(false)
+#if (MOZ_WIDGET_GTK == 3)
+  , mFileChooserDelegate(nullptr)
+#endif
 {
 }
 
 nsFilePicker::~nsFilePicker()
 {
 }
 
 void
--- a/widget/gtk/nsFilePicker.h
+++ b/widget/gtk/nsFilePicker.h
@@ -69,12 +69,14 @@ protected:
   nsString  mDefaultExtension;
 
   nsTArray<nsCString> mFilters;
   nsTArray<nsCString> mFilterNames;
 
 private:
   static nsIFile *mPrevDisplayDirectory;
 
+#if (MOZ_WIDGET_GTK == 3)
   GtkFileChooserWidget *mFileChooserDelegate;
+#endif
 };
 
 #endif