[Libreoffice-commits] core.git: registry/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 22 06:16:07 UTC 2021
registry/source/reflwrit.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 505fb3f952106d6fafd300097cce83c2050fbc60
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Jul 21 17:16:19 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jul 22 08:15:30 2021 +0200
-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 at redhat.com>
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;
}
}
More information about the Libreoffice-commits
mailing list