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 /desktop | |
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 'desktop')
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index b1674138c5cd..923aab00c702 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -667,8 +667,9 @@ void RequestHandler::EnableRequests() if (pGlobal->mState != State::Downing) { pGlobal->mState = State::RequestsEnabled; } - // hit the compiler over the head - ProcessDocumentsRequest aEmptyReq { std::optional< OUString >() }; + // hit the compiler over the head - this avoids GCC -Werror=maybe-uninitialized + std::optional<OUString> tmp; + ProcessDocumentsRequest aEmptyReq(tmp); // trigger already queued requests RequestHandler::ExecuteCmdLineRequests(aEmptyReq, true); } |