diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-02-24 11:02:04 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-02-24 19:23:38 +0100 |
commit | 1ca7e41fa8e300d0f5b8e0427ea3e6cad27ce175 (patch) | |
tree | 5d98bfd7793673962079aaf449f1e47874d6e524 /vcl | |
parent | 589abe39262a37fb1205fac229d7004ee01dd3f9 (diff) |
workaround GCC 9.2.1 -Og -Werror=maybe-uninitialized
vcl/unx/generic/gdi/salbmp.cxx:727:32: error: ‘pixmapHandle’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vcl/unx/gtk3/gtk3gtkinst.cxx:7336:16: error: ‘eRet’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
etc.
One looks like it might occur in practice.
Change-Id: I09af7d36b134b31cb7bd8047b5c73f4a49c9d9b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89351
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/salbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 20760a452559..96b437c0ed98 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -708,7 +708,7 @@ bool X11SalBitmap::Create( css::uno::Sequence< css::uno::Any > args; if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) { - long pixmapHandle; + long pixmapHandle = {}; // spurious -Werror=maybe-uninitialized if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) { mbGrey = bMask; diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 0875bb071251..9d958393a5f1 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -59,6 +59,7 @@ #include <cppuhelper/supportsservice.hxx> #include <officecfg/Office/Common.hxx> #include <rtl/bootstrap.hxx> +#include <o3tl/unreachable.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <tools/helpers.hxx> @@ -7332,6 +7333,8 @@ public: case vcl::ImageType::Size32: eRet = GTK_ICON_SIZE_DIALOG; break; + default: + O3TL_UNREACHABLE; } return eRet; } |