Avoid gcc -Wunused-function warnings in wxEvtHandler unit test
The warnings are justified as the functions defined by the event table macros are indeed not used here because we only write them to test that they compile, but not useful, so suppress them.
This commit is contained in:
@@ -127,6 +127,11 @@ private:
|
|||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Avoid gcc warning about some of the functions defined by the expansion of
|
||||||
|
// the event table macros being unused: they are indeed unused, but we still
|
||||||
|
// want to have them to check that they compile.
|
||||||
|
wxGCC_WARNING_SUPPRESS(unused-function)
|
||||||
|
|
||||||
wxBEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler)
|
wxBEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler)
|
||||||
EVT_IDLE(MyClassWithEventTable::OnIdle)
|
EVT_IDLE(MyClassWithEventTable::OnIdle)
|
||||||
|
|
||||||
@@ -138,6 +143,8 @@ wxBEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler)
|
|||||||
//EVT_IDLE(MyClassWithEventTable::OnAnotherEvent)
|
//EVT_IDLE(MyClassWithEventTable::OnAnotherEvent)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
|
wxGCC_WARNING_RESTORE(unused-function)
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user