diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-29 12:42:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-30 16:39:21 +0200 |
commit | d4d8fb12e81152ad75d1ab4cabfa300aa982e589 (patch) | |
tree | 5c2d19e78a930d27ebc9f2188020e79ec68f9b57 /bridges | |
parent | 8b2a2de2481843502f0566e773ed11532520bc70 (diff) |
cid#1489551 silence Uninitialized scalar variable
and
cid#1489552 Uninitialized scalar variable
Change-Id: I056cfd95d34f2163e68b83cce21bce70ccf5fc8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119701
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx index 355a0a7500d7..f36678ed3695 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx @@ -224,9 +224,8 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c bool x86_64::examine_argument( typelib_TypeDescriptionReference *pTypeRef, int &nUsedGPR, int &nUsedSSE ) noexcept { enum x86_64_reg_class classes[MAX_CLASSES]; - int n; - - n = classify_argument( pTypeRef, classes, 0 ); + // coverity[uninit_use_in_call : FALSE] + int n = classify_argument( pTypeRef, classes, 0 ); if ( n == 0 ) return false; @@ -255,12 +254,14 @@ bool x86_64::return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef if (pTypeRef->eTypeClass == typelib_TypeClass_VOID) { return false; } - x86_64_reg_class classes[MAX_CLASSES]; + enum x86_64_reg_class classes[MAX_CLASSES]; + // coverity[uninit_use_in_call : FALSE] return classify_argument(pTypeRef, classes, 0) == 0; } x86_64::ReturnKind x86_64::getReturnKind(typelib_TypeDescriptionReference * type) noexcept { x86_64_reg_class classes[MAX_CLASSES]; + // coverity[uninit_use_in_call : FALSE] auto const n = classify_argument(type, classes, 0); if (n == 0) { return ReturnKind::Memory; @@ -276,9 +277,8 @@ x86_64::ReturnKind x86_64::getReturnKind(typelib_TypeDescriptionReference * type void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64 *pGPR, const double *pSSE, void *pStruct ) noexcept { enum x86_64_reg_class classes[MAX_CLASSES]; - int n; - - n = classify_argument( pTypeRef, classes, 0 ); + // coverity[uninit_use_in_call : FALSE] + int n = classify_argument( pTypeRef, classes, 0 ); sal_uInt64 *pStructAlign = static_cast<sal_uInt64 *>( pStruct ); for ( int i = 0; i != n; ++i ) |