From 8d22935dcb05670708c818ee01ca072f1792ff13 Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun, 11 Nov 2007 12:55:43 +0000
Subject: [PATCH] unused parameter warning fixes for --disable-all-features
 build

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/dlgcmn.cpp   |  4 +++-
 src/common/framecmn.cpp |  4 ++++
 src/common/utilscmn.cpp | 10 ++++++++--
 src/gtk/bitmap.cpp      |  3 +++
 src/gtk/dcclient.cpp    | 16 +++++++++++++++-
 src/unix/fontutil.cpp   |  2 ++
 6 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp
index 8e771902ba..5621cbc6a9 100644
--- a/src/common/dlgcmn.cpp
+++ b/src/common/dlgcmn.cpp
@@ -192,7 +192,9 @@ wxSizer *wxDialogBase::CreateButtonSizer(long flags)
     {
         sizer = CreateStdDialogButtonSizer(flags);
     }
-#endif // wxUSE_BUTTON
+#else // !wxUSE_BUTTON
+    wxUnusedVar(flags);
+#endif // wxUSE_BUTTON/!wxUSE_BUTTON
 
 #endif // __SMARTPHONE__/!__SMARTPHONE__
 
diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp
index e93d1010e1..38ad2f2c38 100644
--- a/src/common/framecmn.cpp
+++ b/src/common/framecmn.cpp
@@ -133,6 +133,8 @@ bool wxFrameBase::IsOneOfBars(const wxWindow *win) const
         return true;
 #endif // wxUSE_TOOLBAR
 
+    wxUnusedVar(win);
+
     return false;
 }
 
@@ -212,6 +214,8 @@ bool wxFrameBase::ProcessCommand(int id)
     GetEventHandler()->ProcessEvent(commandEvent);
     return true;
 #else // !wxUSE_MENUS
+    wxUnusedVar(id);
+
     return false;
 #endif // wxUSE_MENUS/!wxUSE_MENUS
 }
diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp
index 2183825135..09e92fc0ad 100644
--- a/src/common/utilscmn.cpp
+++ b/src/common/utilscmn.cpp
@@ -1242,13 +1242,19 @@ wxFindWindowByName (const wxString& name, wxWindow * parent)
 
 // Returns menu item id or wxNOT_FOUND if none.
 int
-wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString)
+wxFindMenuItemId(wxFrame *frame,
+                 const wxString& menuString,
+                 const wxString& itemString)
 {
 #if wxUSE_MENUS
     wxMenuBar *menuBar = frame->GetMenuBar ();
     if ( menuBar )
         return menuBar->FindMenuItem (menuString, itemString);
-#endif // wxUSE_MENUS
+#else // !wxUSE_MENUS
+    wxUnusedVar(frame);
+    wxUnusedVar(menuString);
+    wxUnusedVar(itemString);
+#endif // wxUSE_MENUS/!wxUSE_MENUS
 
     return wxNOT_FOUND;
 }
diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp
index e5f2b669d1..663c9ec721 100644
--- a/src/gtk/bitmap.cpp
+++ b/src/gtk/bitmap.cpp
@@ -701,6 +701,9 @@ bool wxBitmap::SaveFile( const wxString &name, wxBitmapType type, const wxPalett
     wxImage image = ConvertToImage();
     return image.Ok() && image.SaveFile(name, type);
 #else // !wxUSE_IMAGE
+    wxUnusedVar(name);
+    wxUnusedVar(type);
+
     return false;
 #endif // wxUSE_IMAGE
 }
diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp
index ff4289883b..200eafb460 100644
--- a/src/gtk/dcclient.cpp
+++ b/src/gtk/dcclient.cpp
@@ -469,6 +469,11 @@ bool wxGTKWindowImplDC::DoFloodFill(wxCoord x, wxCoord y,
 
     return wxDoFloodFill( GetOwner(), x, y, col, style);
 #else
+    wxUnusedVar(x);
+    wxUnusedVar(y);
+    wxUnusedVar(col);
+    wxUnusedVar(style);
+
     return false;
 #endif
 }
@@ -488,6 +493,10 @@ bool wxGTKWindowImplDC::DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) cons
     col->Set(image.GetRed(0, 0), image.GetGreen(0, 0), image.GetBlue(0, 0));
     return true;
 #else // !wxUSE_IMAGE
+    wxUnusedVar(x1);
+    wxUnusedVar(y1);
+    wxUnusedVar(col);
+
     return false;
 #endif // wxUSE_IMAGE/!wxUSE_IMAGE
 }
@@ -1736,7 +1745,12 @@ void wxGTKWindowImplDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCo
     // update the bounding box
     CalcBoundingBox(x + minX, y + minY);
     CalcBoundingBox(x + maxX, y + maxY);
-#endif // wxUSE_IMAGE
+#else // !wxUSE_IMAGE
+    wxUnusedVar(text);
+    wxUnusedVar(x);
+    wxUnusedVar(y);
+    wxUnusedVar(angle);
+#endif // wxUSE_IMAGE/!wxUSE_IMAGE
 }
 
 void wxGTKWindowImplDC::DoGetTextExtent(const wxString &string,
diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp
index 7275663fe2..713510290d 100644
--- a/src/unix/fontutil.cpp
+++ b/src/unix/fontutil.cpp
@@ -316,9 +316,11 @@ bool wxNativeFontInfo::FromString(const wxString& s)
 
     description = pango_font_description_from_string(wxPANGO_CONV(str));
 
+#if wxUSE_FONTENUM
     // ensure a valid facename is selected
     if (!wxFontEnumerator::IsValidFacename(GetFaceName()))
         SetFaceName(wxNORMAL_FONT->GetFaceName());
+#endif // wxUSE_FONTENUM
 
     return true;
 }
-- 
2.47.2