Work around or suppress gcc -Wunused-value warnings in wxMSW code.
TDM-GCC 4.9.2 gave many of these warnings for the calls to Windows common controls macros, avoid them by adding error reporting where it makes sense or just suppressing the warning by explicitly casting to void elsewhere (e.g. for the macros which have no meaningful return value at all or return something that we're not interested in instead of just success/failure indicator).
This commit is contained in:
@@ -90,7 +90,7 @@ bool wxHeaderCtrl::Create(wxWindow *parent,
|
||||
// use 0 here but this starts to look ugly)
|
||||
if ( wxApp::GetComCtl32Version() >= 600 )
|
||||
{
|
||||
Header_SetBitmapMargin(GetHwnd(), ::GetSystemMetrics(SM_CXEDGE));
|
||||
(void)Header_SetBitmapMargin(GetHwnd(), ::GetSystemMetrics(SM_CXEDGE));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -237,7 +237,8 @@ void wxHeaderCtrl::DoUpdate(unsigned int idx)
|
||||
if ( !m_isHidden[idx] )
|
||||
{
|
||||
// but it wasn't hidden before, so remove it
|
||||
Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx));
|
||||
if ( !Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx)) )
|
||||
wxLogLastError(wxS("Header_DeleteItem()"));
|
||||
|
||||
m_isHidden[idx] = true;
|
||||
}
|
||||
@@ -252,7 +253,8 @@ void wxHeaderCtrl::DoUpdate(unsigned int idx)
|
||||
else // and it was shown before as well
|
||||
{
|
||||
// we need to remove the old column
|
||||
Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx));
|
||||
if ( !Header_DeleteItem(GetHwnd(), MSWToNativeIdx(idx)) )
|
||||
wxLogLastError(wxS("Header_DeleteItem()"));
|
||||
}
|
||||
|
||||
DoInsertItem(col, idx);
|
||||
|
Reference in New Issue
Block a user