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
This commit is contained in:
Vadim Zeitlin 2012-05-25 09:48:20 +00:00
parent 0cd7db14f0
commit 005a8a4c77

View File

@ -609,7 +609,9 @@ int wxGnomePrintDialog::ShowModal()
m_printDialogData.SetNoCopies( copies ); m_printDialogData.SetNoCopies( copies );
m_printDialogData.SetCollate( collate ); 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<int>( gs_libGnomePrint->gnome_print_dialog_get_range( (GnomePrintDialog*) m_widget )))
{ {
case GNOME_PRINT_RANGE_SELECTION: case GNOME_PRINT_RANGE_SELECTION:
m_printDialogData.SetSelection( true ); m_printDialogData.SetSelection( true );