[CI] Fix new errors from cpp-check 2.15: `returnByReference`
cpp-check
is reporting new errors after a version upgrade from 2.13 -> 2.14. For the time being and to unfreeze the CI I have added a supression for the returnByReference
errors. They should be fixed.
The error a files are:
<?xml version="1.0" encoding="UTF-8"?>
<results version="2">
<cppcheck version="2.15 dev"/>
<errors>
<error id="returnByReference" severity="performance" msg="Function 'get_help_text()' should return member 'm_help_txt' by const reference." verbose="Function 'get_help_text()' should return member 'm_help_txt' by const reference." file0="cmdline/CtaAdminCmdParse.cpp">
<location file="cmdline/CtaAdminCmdParse.hpp" line="105" column="16"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'str()' should return member 'm_trace' by const reference." verbose="Function 'str()' should return member 'm_trace' by const reference." file0="common/exception/Backtrace.cpp">
<location file="common/exception/Backtrace.hpp" line="28" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'token()' should return member 'm_token' by const reference." verbose="Function 'token()' should return member 'm_token' by const reference." file0="eos_grpc_client/GrpcClient.cpp">
<location file="eos_grpc_client/GrpcClient.hpp" line="65" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getCatalogueConnString()' should return member 'm_catalogue_conn_string' by const reference." verbose="Function 'getCatalogueConnString()' should return member 'm_catalogue_conn_string' by const reference." file0="frontend/common/FrontendService.cpp">
<location file="frontend/common/FrontendService.hpp" line="46" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getVerificationMountPolicy()' should return member 'm_verificationMountPolicy' by const reference." verbose="Function 'getVerificationMountPolicy()' should return member 'm_verificationMountPolicy' by const reference." file0="frontend/common/FrontendService.cpp">
<location file="frontend/common/FrontendService.hpp" line="91" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getNamespaceMap()' should return member 'm_namespaceMap' by const reference." verbose="Function 'getNamespaceMap()' should return member 'm_namespaceMap' by const reference." file0="frontend/common/FrontendService.cpp">
<location file="frontend/common/FrontendService.hpp" line="96" column="23"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'token()' should return member 'm_token' by const reference." verbose="Function 'token()' should return member 'm_token' by const reference." file0="frontend/common/GrpcClient.cpp">
<location file="frontend/common/GrpcClient.hpp" line="42" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'token()' should return member 'm_strToken' by const reference." verbose="Function 'token()' should return member 'm_strToken' by const reference." file0="frontend/grpc/ClientNegotiationRequestHandler.cpp">
<location file="frontend/grpc/ClientNegotiationRequestHandler.hpp" line="41" column="28"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'user()' should return member 'm_user' by const reference." verbose="Function 'user()' should return member 'm_user' by const reference." file0="objectstore/BackendFactory.cpp">
<location file="objectstore/BackendRados.hpp" line="51" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'pool()' should return member 'm_pool' by const reference." verbose="Function 'pool()' should return member 'm_pool' by const reference." file0="objectstore/BackendFactory.cpp">
<location file="objectstore/BackendRados.hpp" line="54" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getPath()' should return member 'm_path' by const reference." verbose="Function 'getPath()' should return member 'm_path' by const reference." file0="objectstore/BackendFactory.cpp">
<location file="objectstore/BackendVFS.hpp" line="198" column="17"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getRAOAlgorithmName()' should return member 'm_raoAlgorithmName' by const reference." verbose="Function 'getRAOAlgorithmName()' should return member 'm_raoAlgorithmName' by const reference." file0="tapeserver/castor/tape/tapeserver/RAO/ConfigurableRAOAlgorithmFactory.cpp">
<location file="tapeserver/castor/tape/tapeserver/RAO/RAOParams.hpp" line="64" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getFilePositionInfos()' should return member 'm_filePositionInfos' by const reference." verbose="Function 'getFilePositionInfos()' should return member 'm_filePositionInfos' by const reference." file0="tapeserver/castor/tape/tapeserver/RAO/ConfigurableRAOAlgorithmFactory.cpp">
<location file="tapeserver/castor/tape/tapeserver/RAO/RAOFile.hpp" line="47" column="21"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getOptionsString()' should return member 'm_options' by const reference." verbose="Function 'getOptionsString()' should return member 'm_options' by const reference." file0="tapeserver/castor/tape/tapeserver/RAO/RAOOptions.cpp">
<location file="tapeserver/castor/tape/tapeserver/RAO/RAOOptions.hpp" line="79" column="15"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'getRAOAlgorithmOptions()' should return member 'm_raoAlgorithmOptions' by const reference." verbose="Function 'getRAOAlgorithmOptions()' should return member 'm_raoAlgorithmOptions' by const reference." file0="tapeserver/castor/tape/tapeserver/RAO/SLTFRAOAlgorithm.cpp">
<location file="tapeserver/castor/tape/tapeserver/RAO/RAOParams.hpp" line="68" column="14"/>
</error>
<error id="returnByReference" severity="performance" msg="Function 'path()' should return member 'm_path' by const reference." verbose="Function 'path()' should return member 'm_path' by const reference." file0="tests/TempFile.cpp">
<location file="tests/TempFile.hpp" line="31" column="15"/>
</error>
</errors>
</results>
Edited by Pablo Oliver Cortes