wxwidgets.cfg: Fixed wrong configuration for wxLogApiError(). This function does return after appending data to wxLog(). Ensure that no duplicateBreak-warning is issued in case code resides afterwards.

This commit is contained in:
orbitcowboy 2021-04-13 13:07:15 +02:00
parent fce3db8b7d
commit cf211610d3
3 changed files with 18 additions and 5 deletions

View File

@ -5539,7 +5539,7 @@
</function> </function>
<!-- #define wxLogApiError(api, rc) --> <!-- #define wxLogApiError(api, rc) -->
<function name="wxLogApiError"> <function name="wxLogApiError">
<noreturn>true</noreturn> <noreturn>false</noreturn>
<returnValue type="void"/> <returnValue type="void"/>
<leak-ignore/> <leak-ignore/>
<arg nr="1" direction="in"> <arg nr="1" direction="in">

View File

@ -93,7 +93,7 @@ else
${CXX} ${CXX_OPT} ${WXCONFIG} -Wno-deprecated-declarations ${DIR}wxwidgets.cpp ${CXX} ${CXX_OPT} ${WXCONFIG} -Wno-deprecated-declarations ${DIR}wxwidgets.cpp
fi fi
fi fi
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=wxwidgets -f ${DIR}wxwidgets.cpp ${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=wxwidgets,windows -f ${DIR}wxwidgets.cpp
# gtk.c # gtk.c
set +e set +e

View File

@ -28,19 +28,32 @@
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/propgrid/property.h> #include <wx/propgrid/property.h>
wxString useRetval_wxString_MakeCapitalized(wxString &str) #ifdef __VISUALC__
// Ensure no duplicateBreak warning is issued after wxLogApiError() calls.
// This function does not terminate execution.
bool duplicateBreak_wxLogApiError(const wxString &msg, const HRESULT &hr)
{
if (FAILED(hr)) {
wxLogApiError(msg,hr);
return false;
}
return true;
}
#endif
void useRetval_wxString_MakeCapitalized(wxString &str)
{ {
// No warning is expected for // No warning is expected for
str.MakeCapitalized(); str.MakeCapitalized();
} }
wxString useRetval_wxString_MakeLower(wxString &str) void useRetval_wxString_MakeLower(wxString &str)
{ {
// No warning is expected for // No warning is expected for
str.MakeLower(); str.MakeLower();
} }
wxString useRetval_wxString_MakeUpper(wxString &str) void useRetval_wxString_MakeUpper(wxString &str)
{ {
// No warning is expected for // No warning is expected for
str.MakeUpper(); str.MakeUpper();