-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>
This commit is contained in:
Stephan Bergmann
2021-07-22 08:15:30 +02:00
parent 0d4cbdbc9c
commit 505fb3f952
+1
View File
@@ -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;
}
}