[Libreoffice-commits] core.git: bridges/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 30 14:39:55 UTC 2021


 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit d4d8fb12e81152ad75d1ab4cabfa300aa982e589
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 29 12:42:17 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 30 16:39:21 2021 +0200

    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 at redhat.com>

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 )


More information about the Libreoffice-commits mailing list