[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 24 05:19:02 UTC 2021


 vcl/source/filter/png/PngImageReader.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit fa2083ff5d913274c3ca30a69edadde907cb7119
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Aug 23 16:39:15 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Aug 24 07:18:18 2021 +0200

    Blind fix for false -Werror=clobbered on lo_callgrind_linux
    
    ...first seen at <https://ci.libreoffice.org//job/lo_callgrind_linux/11311/>
    
    > /home/buildslave/lode/jenkins/workspace/lo_callgrind_linux/vcl/source/filter/png/PngImageReader.cxx: In function ‘bool {anonymous}::reader(SvStream&, BitmapEx&, GraphicFilterImportFlags, BitmapScopedWriteAccess*, AlphaScopedWriteAccess*)’:
    > /home/buildslave/lode/jenkins/workspace/lo_callgrind_linux/vcl/source/filter/png/PngImageReader.cxx:101:16: error: variable ‘bSupportsBitmap32’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
    >      const bool bSupportsBitmap32 = bFuzzing || ImplGetSVData()->mpDefInst->supportsBitmap32();
    >                 ^~~~~~~~~~~~~~~~~
    
    which reportedly uses
    
    > export GCC_VERSION=800
    
    Change-Id: I9ef5e1e3a735c91f63dd9f5ced05e8acaa731923
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120868
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx
index 6fc182cc24b3..c4e04ad0f1d8 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -67,6 +67,10 @@ struct PngDestructor
     png_infop pInfo;
 };
 
+#if defined __GNUC__ && __GNUC__ == 8 && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wclobbered"
+#endif
 bool reader(SvStream& rStream, BitmapEx& rBitmapEx,
             GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE,
             BitmapScopedWriteAccess* pAccess = nullptr,
@@ -439,6 +443,9 @@ std::unique_ptr<sal_uInt8[]> getMsGifChunk(SvStream& rStream, sal_Int32* chunkSi
             return nullptr;
     }
 }
+#if defined __GNUC__ && __GNUC__ == 8 && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
 
 } // anonymous namespace
 


More information about the Libreoffice-commits mailing list