From 04c5a179bed26adf6258cfcba8729102d998c5c8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 Aug 2017 01:53:22 +0200 Subject: [PATCH] Don't compare reference with null in wxBitmap::UngetRawData() This doesn't seem to make any sense as this function is always called with non-null "*this" reference from wxPixelData dtor and results in -Waddress warning from gcc 6. --- src/msw/bitmap.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 3ac130dbd9..e68e85bfac 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1374,20 +1374,12 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) #endif } -void wxBitmap::UngetRawData(wxPixelDataBase& dataBase) +void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(data)) { #if wxUSE_WXDIB if ( !IsOk() ) return; - if ( !&dataBase ) - { - // invalid data, don't crash -- but don't assert neither as we're - // called automatically from wxPixelDataBase dtor and so there is no - // way to prevent this from happening - return; - } - // if we're a DDB we need to convert DIB back to DDB now to make the // changes made via raw bitmap access effective if ( !GetBitmapData()->m_isDIB )