diff --git a/include/wx/app.h b/include/wx/app.h index 4742678657..560a7e21a2 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -609,9 +609,16 @@ protected: // Force an exit from main loop extern void WXDLLIMPEXP_BASE wxExit(); +// avoid redeclaring this function here if it had been already declated by +// wx/utils.h, this results in warnings from g++ with -Wredundant-decls +#ifndef wx_YIELD_DECLARED +#define wx_YIELD_DECLARED + // Yield to other apps/messages extern bool WXDLLIMPEXP_BASE wxYield(); +#endif // wx_YIELD_DECLARED + // Yield to other apps/messages extern void WXDLLIMPEXP_BASE wxWakeUpIdle(); diff --git a/include/wx/utils.h b/include/wx/utils.h index 0d73de0e8c..f2f86227a3 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -720,9 +720,16 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); // wxYield(): these functions are obsolete, please use wxApp methods instead! // ---------------------------------------------------------------------------- +// avoid redeclaring this function here if it had been already declated by +// wx/app.h, this results in warnings from g++ with -Wredundant-decls +#ifndef wx_YIELD_DECLARED +#define wx_YIELD_DECLARED + // Yield to other apps/messages WXDLLIMPEXP_BASE bool wxYield(); +#endif // wx_YIELD_DECLARED + // Like wxYield, but fails silently if the yield is recursive. WXDLLIMPEXP_BASE bool wxYieldIfNeeded();