From 005a8a4c77b187975ddddd05304ce9f40fcae729 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 25 May 2012 09:48:20 +0000 Subject: [PATCH] Suppress warnings about gnome_print_dialog_get_range() return type. This function seems to be declared incorrectly and while it actually does return the values we compare its return value with, it's prototyped with a wrong enum as return type, so explicitly cast it to int to avoid warnings from recent g++ versions. See http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/115782/focus=115955 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/gnome/gprint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 77d8a9f6d4..b3800c1dd5 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -609,7 +609,9 @@ int wxGnomePrintDialog::ShowModal() m_printDialogData.SetNoCopies( copies ); m_printDialogData.SetCollate( collate ); - switch (gs_libGnomePrint->gnome_print_dialog_get_range( (GnomePrintDialog*) m_widget )) + // Cast needed to avoid warnings because the gnome_print_dialog_get_range() + // is declared as returning a wrong enum type. + switch ( static_cast( gs_libGnomePrint->gnome_print_dialog_get_range( (GnomePrintDialog*) m_widget ))) { case GNOME_PRINT_RANGE_SELECTION: m_printDialogData.SetSelection( true );