diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-07-21 17:16:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-07-22 08:15:30 +0200 |
commit | 505fb3f952106d6fafd300097cce83c2050fbc60 (patch) | |
tree | 3510ed28644fb1c533b41309676829b670de0478 /registry | |
parent | 0d4cbdbc9cd4ab06056cec66cffd292b41615b6e (diff) |
-Werror=maybe-uninitialized
> registry/source/reflwrit.cxx: In member function ‘sal_uInt32 RegistryTypeWriter::getBlopSize()’:
> registry/source/reflwrit.cxx:1332:33: error: ‘size’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 1332 | return ::getBlopSize(m_hImpl);
> | ^
at least with recent GCC 12 trunk and --enable-dbgutil --enable-optimized
Change-Id: I17abbb55ba31458147afd486a17e8455ede39b32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119338
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/reflwrit.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 04be2db6e702..8f8e83318433 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -1207,6 +1207,7 @@ void const * TYPEREG_CALLTYPE typereg_writer_getBlob(void * handle, sal_uInt32 * try { writer->createBlop(); } catch (std::bad_alloc &) { + *size = 0; return nullptr; } } |