Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-563): [#def1]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/algorithmic_tests/low_level_api/dictionary_utility_functions.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_c_api_dictionary_get_existing_dictionary_size_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/algorithmic_tests/low_level_api/dictionary_utility_functions.cpp:19:26: warning[-Wunused-variable]: unused variable ‘hw_compr_level’
#   19 |     hw_compression_level hw_compr_level = hw_compression_level::HW_NONE;
#      |                          ^~~~~~~~~~~~~~
#   17|   QPL_LOW_LEVEL_API_ALGORITHMIC_TEST(dictionary, get_existing_dictionary_size) {
#   18|   
#   19|->     hw_compression_level hw_compr_level = hw_compression_level::HW_NONE;
#   20|   
#   21|       for (auto &dataset: util::TestEnvironment::GetInstance().GetAlgorithmicDataset().get_data()) {

Error: COMPILER_WARNING (CWE-563): [#def2]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_expand_8u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp:121:59: warning[-Wunused-variable]: unused variable ‘buffer_src’
#  121 |     std::array<uint8_t, TEST_BUFFER_SIZE*sizeof(uint8_t)> buffer_src{};
#      |                                                           ^~~~~~~~~~
#  119|   using randomizer = qpl::test::random;
#  120|   QPL_UNIT_API_ALGORITHMIC_TEST(qplc_expand_8u, base) {
#  121|->     std::array<uint8_t, TEST_BUFFER_SIZE*sizeof(uint8_t)> buffer_src{};
#  122|       std::array < uint8_t, TEST_BUFFER_SIZE > buffer_mask{};
#  123|       std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint8_t)> source{};

Error: COMPILER_WARNING (CWE-563): [#def3]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_expand_16u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp:240:62: warning[-Wunused-variable]: unused variable ‘buffer_src’
#  240 |     std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint16_t)> buffer_src{};
#      |                                                              ^~~~~~~~~~
#  238|   
#  239|   QPL_UNIT_API_ALGORITHMIC_TEST(qplc_expand_16u, base) {
#  240|->     std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint16_t)> buffer_src{};
#  241|       std::array < uint8_t, TEST_BUFFER_SIZE > buffer_mask{};
#  242|       std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint16_t)> source{};

Error: COMPILER_WARNING (CWE-563): [#def4]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_expand_32u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_expand.cpp:358:62: warning[-Wunused-variable]: unused variable ‘buffer_src’
#  358 |     std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint32_t)> buffer_src{};
#      |                                                              ^~~~~~~~~~
#  356|   
#  357|   QPL_UNIT_API_ALGORITHMIC_TEST(qplc_expand_32u, base) {
#  358|->     std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint32_t)> buffer_src{};
#  359|       std::array < uint8_t, TEST_BUFFER_SIZE > buffer_mask{};
#  360|       std::array<uint8_t, TEST_BUFFER_SIZE * sizeof(uint32_t)> source{};

Error: COMPILER_WARNING (CWE-563): [#def5]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_unpack_prle_8u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:552:30: warning[-Wunused-variable]: unused variable ‘index’
#  552 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  550|                       uint32_t* p_value = (uint32_t*)value.data();
#  551|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  552|->                     uint32_t index = 0U;
#  553|                       uint32_t ref_index = 0U;
#  554|   

Error: COMPILER_WARNING (CWE-563): [#def6]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:553:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  553 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  551|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  552|                       uint32_t index = 0U;
#  553|->                     uint32_t ref_index = 0U;
#  554|   
#  555|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-563): [#def7]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:594:30: warning[-Wunused-variable]: unused variable ‘index’
#  594 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  592|                       uint32_t* p_value = (uint32_t*)value.data();
#  593|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  594|->                     uint32_t index = 0U;
#  595|                       uint32_t ref_index = 0U;
#  596|   

Error: COMPILER_WARNING (CWE-563): [#def8]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:595:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  595 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  593|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  594|                       uint32_t index = 0U;
#  595|->                     uint32_t ref_index = 0U;
#  596|   
#  597|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-563): [#def9]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_unpack_prle_16u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:646:30: warning[-Wunused-variable]: unused variable ‘index’
#  646 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  644|                       uint32_t* p_value = (uint32_t*)value.data();
#  645|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  646|->                     uint32_t index = 0U;
#  647|                       uint32_t ref_index = 0U;
#  648|   

Error: COMPILER_WARNING (CWE-563): [#def10]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:647:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  647 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  645|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  646|                       uint32_t index = 0U;
#  647|->                     uint32_t ref_index = 0U;
#  648|   
#  649|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-563): [#def11]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:688:30: warning[-Wunused-variable]: unused variable ‘index’
#  688 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  686|                       uint32_t* p_value = (uint32_t*)value.data();
#  687|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  688|->                     uint32_t index = 0U;
#  689|                       uint32_t ref_index = 0U;
#  690|   

Error: COMPILER_WARNING (CWE-563): [#def12]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:689:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  689 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  687|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  688|                       uint32_t index = 0U;
#  689|->                     uint32_t ref_index = 0U;
#  690|   
#  691|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-563): [#def13]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp: scope_hint: In member function ‘virtual void qpl::test::ta_unit_api_qplc_unpack_prle_32u_base_Test::TestBody()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:742:30: warning[-Wunused-variable]: unused variable ‘index’
#  742 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  740|                       uint32_t* p_value = (uint32_t*)value.data();
#  741|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  742|->                     uint32_t index = 0U;
#  743|                       uint32_t ref_index = 0U;
#  744|   

Error: COMPILER_WARNING (CWE-563): [#def14]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:743:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  743 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  741|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  742|                       uint32_t index = 0U;
#  743|->                     uint32_t ref_index = 0U;
#  744|   
#  745|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-563): [#def15]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:785:30: warning[-Wunused-variable]: unused variable ‘index’
#  785 |                     uint32_t index = 0U;
#      |                              ^~~~~
#  783|                       uint32_t* p_value = (uint32_t*)value.data();
#  784|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  785|->                     uint32_t index = 0U;
#  786|                       uint32_t ref_index = 0U;
#  787|   

Error: COMPILER_WARNING (CWE-563): [#def16]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/tests/functional/unit_tests/algorithmic/core_unpack_prle.cpp:786:30: warning[-Wunused-variable]: unused variable ‘ref_index’
#  786 |                     uint32_t ref_index = 0U;
#      |                              ^~~~~~~~~
#  784|                       uint32_t* p_ref_value = (uint32_t*)ref_value.data();
#  785|                       uint32_t index = 0U;
#  786|->                     uint32_t ref_index = 0U;
#  787|   
#  788|                       int32_t count_current = count;

Error: COMPILER_WARNING (CWE-569): [#def17]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/common/source_provider.cpp: scope_hint: In member function ‘std::vector<unsigned char> qpl::test::source_provider::generate_expand_rle_prle_stream()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/common/source_provider.cpp:296:57: warning[-Wparentheses]: suggest parentheses around ‘&&’ within ‘||’
#  296 |             if (elements_remain >= PRLE_OCTA_GROUP_SIZE && uint32_t(num_generator) % 2 == 0 ||
#      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  294|           while (elements_remain > 0)
#  295|           {
#  296|->             if (elements_remain >= PRLE_OCTA_GROUP_SIZE && uint32_t(num_generator) % 2 == 0 ||
#  297|                   (accumulate_values && elements_remain >= PRLE_OCTA_GROUP_SIZE))
#  298|               {

Error: COMPILER_WARNING: [#def18]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/index_generator.cpp: scope_hint: In member function ‘GenStatus gz_generator::IndexGenerator::generate(std::vector<unsigned char>&, std::vector<unsigned char>&, TestFactor&)’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/index_generator.cpp:83:17: warning[-Wcatch-value=]: catching polymorphic type ‘class std::exception’ by value
#   83 |     catch (std::exception)
#      |                 ^~~~~~~~~
#   81|           return GEN_OK;
#   82|       }
#   83|->     catch (std::exception)
#   84|       {
#   85|           return GEN_ERR;

Error: COMPILER_WARNING: [#def19]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/inflate_generator.cpp: scope_hint: In member function ‘GenStatus gz_generator::InflateGenerator::generate(std::vector<unsigned char>&, std::vector<unsigned char>&, TestFactor&)’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/inflate_generator.cpp:283:17: warning[-Wcatch-value=]: catching polymorphic type ‘class std::exception’ by value
#  283 |     catch (std::exception)
#      |                 ^~~~~~~~~
#  281|           return GEN_OK;
#  282|       }
#  283|->     catch (std::exception)
#  284|       {
#  285|           return GEN_ERR;

Error: COMPILER_WARNING (CWE-9001): [#def20]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/random_generator.cpp: scope_hint: In member function ‘double qpl::test::random_base::gen()’
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/random_generator.cpp:44:30: warning[-Wstrict-aliasing]: dereferencing type-punned pointer will break strict-aliasing rules
#   44 |    *((uint32_t*)(&cnst2in31) + 0) = 0x00000000;
#      |     ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
#   42|   {
#   43|      double cnst2in31;// exact number for 0.4656613e-9 == 2^-31
#   44|->    *((uint32_t*)(&cnst2in31) + 0) = 0x00000000;
#   45|      *((uint32_t*)(&cnst2in31) + 1) = 0x3e000000;
#   46|   

Error: COMPILER_WARNING (CWE-457): [#def21]
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/random_generator.cpp:59:30: warning[-Wuninitialized]: ‘cnst2in31’ is used uninitialized
#   59 |    double result = cnst2in31 * ( s1 + s2 ) * m_mpy + m_add;
#      |                    ~~~~~~~~~~^~~~~~~~~~~~~
intel-qpl-1.5.0-build/qpl-1.5.0/tools/utils/generators/random_generator.cpp:43:11: note: ‘cnst2in31’ declared here
#   43 |    double cnst2in31;// exact number for 0.4656613e-9 == 2^-31
#      |           ^~~~~~~~~
#   57|      s2n1 = s2;
#   58|      //return m_mpy * 0.4656613e-9 * ( s1 + s2 ) + m_add;
#   59|->    double result = cnst2in31 * ( s1 + s2 ) * m_mpy + m_add;
#   60|      result = std::max( result, m_valMin );
#   61|      result = std::min( result, m_valMax );

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-189.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-nameintel-qpl-1.6.0-1.fc42
diffbase-store-results-to/tmp/tmp1919rs9u/intel-qpl-1.6.0-1.fc42.tar.xz
diffbase-time-created2024-11-13 00:21:19
diffbase-time-finished2024-11-13 00:25:31
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp1919rs9u/intel-qpl-1.6.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp1919rs9u/intel-qpl-1.6.0-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-189.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameintel-qpl-1.5.0-2.fc41
store-results-to/tmp/tmpm1c14ocg/intel-qpl-1.5.0-2.fc41.tar.xz
time-created2024-11-13 00:16:52
time-finished2024-11-13 00:20:55
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpm1c14ocg/intel-qpl-1.5.0-2.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpm1c14ocg/intel-qpl-1.5.0-2.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9