Skip to content

Automated Sync with CMSIS-NN - #115

Merged
PhilippvK merged 2 commits into
masterfrom
sync
Nov 2, 2026
Merged

PhilippvK merged 2 commits into
masterfrom
sync

Conversation

@PhilippvK

Copy link
Copy Markdown
Member

Automated changes by create-pull-request GitHub action

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-format (v21.1.8) reports: 7 file(s) not formatted
  • Include/muriscv_nn_functions.h
  • Include/muriscv_nn_support_functions.h
  • Source/ConvolutionFunctions/muriscv_nn_convolve_s8_pack_weights.c
  • Source/NNSupportFunctions/muriscv_nn_mat_mul_core_4x_s8.c
  • Source/NNSupportFunctions/muriscv_nn_mat_mult_nt_t_s8_packed.c
  • Tests/TestCases/test_muriscv_nn_lstm_unidirectional_s16/test_muriscv_nn_lstm_unidirectional_s16.c
  • Tests/TestCases/test_muriscv_nn_lstm_unidirectional_s8/test_muriscv_nn_lstm_unidirectional_s8.c
clang-tidy (v21.1.8) reports: 379 concern(s)
  • Include/CMSIS/NN/Include/arm_nn_math_types.h:23:10: error: [clang-diagnostic-error]

    'muriscv_nn_math_types.h' file not found

       23 | #include "muriscv_nn_math_types.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~
  • Include/CMSIS/NN/Include/arm_nn_types.h:23:10: error: [clang-diagnostic-error]

    'muriscv_nn_types.h' file not found

       23 | #include "muriscv_nn_types.h"
          |          ^~~~~~~~~~~~~~~~~~~~
  • Include/muriscv_nn_support_functions.h:1312:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1312 |     memcpy(&val, *in_q15, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1312:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1312 |     memcpy(&val, *in_q15, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1326:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1326 |     memcpy(&val, *in_s8, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1326:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1326 |     memcpy(&val, *in_s8, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1340:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1340 |     memcpy(&val, *in_s8, 2);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1340:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1340 |     memcpy(&val, *in_s8, 2);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1354:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1354 |     memcpy(&val, in, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1354:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1354 |     memcpy(&val, in, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1367:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1367 |     memcpy(&val, in_s8, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1367:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1367 |     memcpy(&val, in_s8, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1379:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1379 |     memcpy(&val, in_s8, 2);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1379:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1379 |     memcpy(&val, in_s8, 2);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1391:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1391 |     memcpy(*in, &value, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1391:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1391 |     memcpy(*in, &value, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1405:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1405 |     memcpy(&val, *in_q15, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1405:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1405 |     memcpy(&val, *in_q15, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1468:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1468 |     memcpy(&val, *in_q7, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1468:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1468 |     memcpy(&val, *in_q7, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1526:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1526 |     memcpy(*in, &value, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1526:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1526 |     memcpy(*in, &value, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1535:67: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1535 | static inline void muriscv_nn_write_q7x4(q7_t *in, q31_t value) { memcpy(in, &value, 4); }
          |                                                                   ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1535:67: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1535 | static inline void muriscv_nn_write_q7x4(q7_t *in, q31_t value) { memcpy(in, &value, 4); }
          |                                                                   ^~~~~~
  • Include/muriscv_nn_support_functions.h:1662:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     1662 |     memcpy(dst, src, block_size);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1662:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     1662 |     memcpy(dst, src, block_size);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1683:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

     1683 |     memset(dst, val, block_size);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1683:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
     1683 |     memset(dst, val, block_size);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:1709:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

     1709 |     memset(dst, val, block_size);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:1709:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
     1709 |     memset(dst, val, block_size);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:2321:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     2321 |     memcpy(dst, src, block_size);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:2321:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     2321 |     memcpy(dst, src, block_size);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:2335:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     2335 |     memcpy(dst, src, block_size);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:2335:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     2335 |     memcpy(dst, src, block_size);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:2599:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     2599 |     memcpy(*dest_q15, &val, 4);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:2599:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     2599 |     memcpy(*dest_q15, &val, 4);
          |     ^~~~~~
  • Include/muriscv_nn_support_functions.h:2610:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

     2610 |     memcpy(*dst, &src, 2);
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Include/muriscv_nn_support_functions.h:2610:5: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
     2610 |     memcpy(*dst, &src, 2);
          |     ^~~~~~
  • Integration/tflm/aww/main.cpp:11:10: error: [clang-diagnostic-error]

    'tensorflow/lite/micro/micro_log.h' file not found

       11 | #include "tensorflow/lite/micro/micro_log.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tflm/ic/main.cpp:11:10: error: [clang-diagnostic-error]

    'tensorflow/lite/micro/micro_log.h' file not found

       11 | #include "tensorflow/lite/micro/micro_log.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tflm/toy/main.cpp:8:10: error: [clang-diagnostic-error]

    'tensorflow/lite/micro/micro_log.h' file not found

        8 | #include "tensorflow/lite/micro/micro_log.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tflm/vww/main.cpp:7:10: error: [clang-diagnostic-error]

    'tensorflow/lite/micro/micro_log.h' file not found

        7 | #include "tensorflow/lite/micro/micro_log.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tvm/aww/main.c:8:10: error: [clang-diagnostic-error]

    'tvm/runtime/c_runtime_api.h' file not found

        8 | #include "tvm/runtime/c_runtime_api.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tvm/ic/main.c:8:10: error: [clang-diagnostic-error]

    'tvm/runtime/c_runtime_api.h' file not found

        8 | #include "tvm/runtime/c_runtime_api.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tvm/toy/main.c:10:10: error: [clang-diagnostic-error]

    'tvm/runtime/c_runtime_api.h' file not found

       10 | #include "tvm/runtime/c_runtime_api.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Integration/tvm/vww/main.c:5:10: error: [clang-diagnostic-error]

    'tvm/runtime/c_runtime_api.h' file not found

        5 | #include "tvm/runtime/c_runtime_api.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Sim/Vicuna/crt/vicuna_crt.h:28:10: error: [clang-diagnostic-error]

    'vicuna/sw/lib/runtime.h' file not found

       28 | #include "vicuna/sw/lib/runtime.h"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~
  • Source/ActivationFunctions/muriscv_nn_activation_s16.c:81:77: warning: [clang-analyzer-core.BitwiseShift]

    Right operand is negative in right shift

       81 |         const int32_t input_data = ((*input) * input_multiplier + rounding) >> abs_left_shift;
          |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:59:5: note: Control jumps to 'case MURISCV_SIGMOID:'  at line 61
       59 |     switch (type)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:64:9: note:  Execution continues on line 73
       64 |         break;
          |         ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:73:39: note: Assuming 'left_shift' is < 0
       73 |     const int32_t input_multiplier = (left_shift < 0) ? 3 : 3 << left_shift;
          |                                       ^~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:73:38: note: '?' condition is true
       73 |     const int32_t input_multiplier = (left_shift < 0) ? 3 : 3 << left_shift;
          |                                      ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:74:37: note: 'left_shift' is < 0
       74 |     const int32_t abs_left_shift = (left_shift < 0) ? -left_shift : 0;
          |                                     ^~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:74:36: note: '?' condition is true
       74 |     const int32_t abs_left_shift = (left_shift < 0) ? -left_shift : 0;
          |                                    ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:74:5: note: 'abs_left_shift' initialized here
       74 |     const int32_t abs_left_shift = (left_shift < 0) ? -left_shift : 0;
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:75:31: note: Assuming 'abs_left_shift' is <= 0
       75 |     const int32_t rounding = (abs_left_shift > 0) ? 1 << (abs_left_shift - 1) : 0;
          |                               ^~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:75:30: note: '?' condition is false
       75 |     const int32_t rounding = (abs_left_shift > 0) ? 1 << (abs_left_shift - 1) : 0;
          |                              ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:79:21: note: Assuming 'i' is < 'size'
       79 |     for (int i = 0; i < size; ++i, input++, output++)
          |                     ^~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:79:5: note: Loop condition is true.  Entering loop body
       79 |     for (int i = 0; i < size; ++i, input++, output++)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ActivationFunctions/muriscv_nn_activation_s16.c:81:77: note: The result of right shift is undefined because the right operand is negative
       81 |         const int32_t input_data = ((*input) * input_multiplier + rounding) >> abs_left_shift;
          |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:72:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'input_x' during its initialization is never read

       72 |     const int32_t input_x = input_dims->w;
          |                   ^~~~~~~   ~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:72:19: note: Value stored to 'input_x' during its initialization is never read
       72 |     const int32_t input_x = input_dims->w;
          |                   ^~~~~~~   ~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:73:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'input_y' during its initialization is never read

       73 |     const int32_t input_y = input_dims->h;
          |                   ^~~~~~~   ~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:73:19: note: Value stored to 'input_y' during its initialization is never read
       73 |     const int32_t input_y = input_dims->h;
          |                   ^~~~~~~   ~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:74:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'input_ch' during its initialization is never read

       74 |     const int32_t input_ch = input_dims->c;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:74:19: note: Value stored to 'input_ch' during its initialization is never read
       74 |     const int32_t input_ch = input_dims->c;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:77:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'output_x' during its initialization is never read

       77 |     const int32_t output_x = output_dims->w;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:77:19: note: Value stored to 'output_x' during its initialization is never read
       77 |     const int32_t output_x = output_dims->w;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:78:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'output_y' during its initialization is never read

       78 |     const int32_t output_y = output_dims->h;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:78:19: note: Value stored to 'output_y' during its initialization is never read
       78 |     const int32_t output_y = output_dims->h;
          |                   ^~~~~~~~   ~~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:79:19: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'output_ch' during its initialization is never read

       79 |     const int32_t output_ch = output_dims->c;
          |                   ^~~~~~~~~   ~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_fast_s16.c:79:19: note: Value stored to 'output_ch' during its initialization is never read
       79 |     const int32_t output_ch = output_dims->c;
          |                   ^~~~~~~~~   ~~~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_convolve_get_buffer_sizes_s8.c:75:84: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'conv_params'

       75 | int32_t muriscv_nn_convolve_1_x_n_s8_get_buffer_size(const muriscv_nn_conv_params *conv_params,
          |                                                                                    ^
  • Source/ConvolutionFunctions/muriscv_nn_convolve_get_buffer_sizes_s8.c:78:77: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'output_dims'

       78 |                                                      const muriscv_nn_dims *output_dims)
          |                                                                             ^
  • Source/ConvolutionFunctions/muriscv_nn_convolve_s4.c:122:29: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      122 |                             memset(two_column_buf, 0, sizeof(int16_t) * input_ch);
          |                             ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_convolve_s4.c:122:29: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      122 |                             memset(two_column_buf, 0, sizeof(int16_t) * input_ch);
          |                             ^~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:124:17: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      124 |                 memset(&col_buffer[index], 0, (kernel_x * input_ch) * ker_y_start * sizeof(int16_t));
          |                 ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:124:17: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      124 |                 memset(&col_buffer[index], 0, (kernel_x * input_ch) * ker_y_start * sizeof(int16_t));
          |                 ^~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:137:25: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      137 |                         memset(&col_buffer[index], 0, input_ch * sizeof(int16_t));
          |                         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:137:25: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      137 |                         memset(&col_buffer[index], 0, input_ch * sizeof(int16_t));
          |                         ^~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:153:17: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      153 |                 memset(&col_buffer[index], 0, (kernel_x * input_ch) * diff * sizeof(int16_t));
          |                 ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:153:17: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      153 |                 memset(&col_buffer[index], 0, (kernel_x * input_ch) * diff * sizeof(int16_t));
          |                 ^~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:383:30: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'col_count' during its initialization is never read

      383 |                     uint16_t col_count = num_cols / 2;
          |                              ^~~~~~~~~   ~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/ConvolutionFunctions/muriscv_nn_depthwise_conv_s4_opt.c:383:30: note: Value stored to 'col_count' during its initialization is never read
      383 |                     uint16_t col_count = num_cols / 2;
          |                              ^~~~~~~~~   ~~~~~~~~~~~~
  • Source/ConvolutionFunctions/muriscv_nn_transpose_conv_get_buffer_sizes_s8.c:40:94: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'transpose_conv_params'

       40 | int32_t muriscv_nn_transpose_conv_s8_get_buffer_size(const muriscv_nn_transpose_conv_params *transpose_conv_params,
          |                                                                                              ^
  • Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8.c:66:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

       66 |         memcpy(vector_sum_buf, bias_data, vector_rows * sizeof(int32_t));
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8.c:66:9: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
       66 |         memcpy(vector_sum_buf, bias_data, vector_rows * sizeof(int32_t));
          |         ^~~~~~
  • Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8.c:70:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       70 |         memset(vector_sum_buf, 0, vector_rows * sizeof(int32_t));
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8.c:70:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       70 |         memset(vector_sum_buf, 0, vector_rows * sizeof(int32_t));
          |         ^~~~~~
  • Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8_s64.c:59:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

       59 |         memcpy(vector_sum_buf, bias_data, vector_rows * sizeof(int64_t));
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8_s64.c:59:9: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
       59 |         memcpy(vector_sum_buf, bias_data, vector_rows * sizeof(int64_t));
          |         ^~~~~~
  • Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8_s64.c:63:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       63 |         memset(vector_sum_buf, 0, vector_rows * sizeof(int64_t));
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/FullyConnectedFunctions/muriscv_nn_vector_sum_s8_s64.c:63:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       63 |         memset(vector_sum_buf, 0, vector_rows * sizeof(int64_t));
          |         ^~~~~~
  • Source/LSTMFunctions/muriscv_nn_lstm_unidirectional_s16.c:57:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       57 |     memset(buffers->cell_state, 0, params->batch_size * params->hidden_size * sizeof(int16_t));
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/LSTMFunctions/muriscv_nn_lstm_unidirectional_s16.c:57:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       57 |     memset(buffers->cell_state, 0, params->batch_size * params->hidden_size * sizeof(int16_t));
          |     ^~~~~~
  • Source/LSTMFunctions/muriscv_nn_lstm_unidirectional_s8.c:57:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       57 |     memset(buffers->cell_state, 0, params->batch_size * params->hidden_size * sizeof(int16_t));
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/LSTMFunctions/muriscv_nn_lstm_unidirectional_s8.c:57:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       57 |     memset(buffers->cell_state, 0, params->batch_size * params->hidden_size * sizeof(int16_t));
          |     ^~~~~~
  • Source/NNSupportFunctions/muriscv_nn_get_buffer_size_common.h:32:2: error: [clang-diagnostic-error]

    unterminated conditional directive

       32 | #ifndef ARM_GET_BUFFER_SIZE_COMMON_H
          |  ^
  • Source/NNSupportFunctions/muriscv_nn_lstm_calculate_gate_s16.c:56:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       56 |     memset(output, 0, params->hidden_size * params->batch_size * sizeof(int16_t));
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/NNSupportFunctions/muriscv_nn_lstm_calculate_gate_s16.c:56:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       56 |     memset(output, 0, params->hidden_size * params->batch_size * sizeof(int16_t));
          |     ^~~~~~
  • Source/NNSupportFunctions/muriscv_nn_lstm_calculate_gate_s8_s16.c:63:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       63 |     memset(output, 0, params->hidden_size * params->batch_size * sizeof(int16_t));
          |     ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/NNSupportFunctions/muriscv_nn_lstm_calculate_gate_s8_s16.c:63:5: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       63 |     memset(output, 0, params->hidden_size * params->batch_size * sizeof(int16_t));
          |     ^~~~~~
  • Source/NNSupportFunctions/muriscv_nn_mat_mult_nt_t_s8.c:60:43: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'row_address_offset'

       60 |                             const int32_t row_address_offset, // CURRENTLY UNUSED, CMSIS USES FOR VECTOR ACCELERATION
          |                                           ^
  • Source/NNSupportFunctions/muriscv_nn_mat_mult_nt_t_s8.c:61:43: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'lhs_cols_offset'

       61 |                             const int32_t lhs_cols_offset)
          |                                           ^
  • Source/NNSupportFunctions/muriscv_nn_vec_mat_mult_t_per_ch_s8.c:57:13: warning: [clang-diagnostic-unknown-pragmas]

    unknown pragma ignored

       57 | #pragma GCC optimize("unroll-loops")
          |             ^
  • Source/NNSupportFunctions/muriscv_nn_vec_mat_mult_t_s8.c:61:63: warning: [clang-diagnostic-unused-parameter]

    unused parameter 'kernel_sum'

       61 |                                                const int32_t *kernel_sum,
          |                                                               ^
  • Source/PoolingFunctions/muriscv_nn_max_pool_s16.c:268:29: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

      268 |                             memcpy(dst, start, channel_in * sizeof(int16_t));
          |                             ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/PoolingFunctions/muriscv_nn_max_pool_s16.c:268:29: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
      268 |                             memcpy(dst, start, channel_in * sizeof(int16_t));
          |                             ^~~~~~
  • Source/PoolingFunctions/muriscv_nn_max_pool_s8.c:86:19: warning: [clang-diagnostic-sign-compare]

    comparison of integers of different signs: 'int32_t' (aka 'int') and 'size_t' (aka 'unsigned long')

       86 |     while (length > idx)
          |            ~~~~~~ ^ ~~~
  • Source/PoolingFunctions/muriscv_nn_max_pool_s8.c:140:19: warning: [clang-diagnostic-sign-compare]

    comparison of integers of different signs: 'int32_t' (aka 'int') and 'size_t' (aka 'unsigned long')

      140 |     while (length > idx)
          |            ~~~~~~ ^ ~~~
  • Source/PoolingFunctions/muriscv_nn_max_pool_s8.c:218:29: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11

      218 |                             memcpy(dst, start, channel_in);
          |                             ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/PoolingFunctions/muriscv_nn_max_pool_s8.c:218:29: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
      218 |                             memcpy(dst, start, channel_in);
          |                             ^~~~~~
  • Source/SVDFunctions/muriscv_nn_svdf_s8.c:115:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11

      115 |     memmove((int8_t *)state_data,
          |     ^~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SVDFunctions/muriscv_nn_svdf_s8.c:115:5: note: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11
      115 |     memmove((int8_t *)state_data,
          |     ^~~~~~~
  • Source/SVDFunctions/muriscv_nn_svdf_state_s16_s8.c:93:5: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11

       93 |     memmove((q15_t *)state_data,
          |     ^~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SVDFunctions/muriscv_nn_svdf_state_s16_s8.c:93:5: note: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11
       93 |     memmove((q15_t *)state_data,
          |     ^~~~~~~
  • Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:86:33: warning: [clang-analyzer-core.DivideZero]

    Division by zero

       86 |     int output_base = (1 << 20) / sum;
          |                       ~~~~~~~~~~^~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:62:17: note: Assuming 'i' is >= 'dim_vec'
       62 |     for (i = 0; i < dim_vec; i++)
          |                 ^~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:62:5: note: Loop condition is false. Execution continues on line 75
       62 |     for (i = 0; i < dim_vec; i++)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:77:5: note: The value 0 is assigned to 'sum'
       77 |     sum = 0;
          |     ^~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:79:5: note: Loop condition is false. Execution continues on line 86
       79 |     for (i = 0; i < dim_vec; i++)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_q7.c:86:33: note: Division by zero
       86 |     int output_base = (1 << 20) / sum;
          |                       ~~~~~~~~~~^~~~~
  • Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:81:45: warning: [clang-analyzer-core.BitwiseShift]

    Right operand is negative in left shift

       81 |         const int32_t shifted_sum = (((sum) << (headroom - 1)) + (1 << 13)) >> 14;
          |                                       ~~~~~~^~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:41:9: note: Assuming field 'exp_lut' is not equal to NULL
       41 |     if (softmax_params->exp_lut == NULL || softmax_params->one_by_one_lut == NULL)
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:41:9: note: Left side of '||' is false
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:41:44: note: Assuming field 'one_by_one_lut' is not equal to NULL
       41 |     if (softmax_params->exp_lut == NULL || softmax_params->one_by_one_lut == NULL)
          |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:41:5: note: Taking false branch
       41 |     if (softmax_params->exp_lut == NULL || softmax_params->one_by_one_lut == NULL)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:46:23: note: Assuming 'row_idx' is < 'num_rows'
       46 |     for (row_idx = 0; row_idx < num_rows; ++row_idx)
          |                       ^~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:46:5: note: Loop condition is true.  Entering loop body
       46 |     for (row_idx = 0; row_idx < num_rows; ++row_idx)
          |     ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:50:23: note: Assuming 'col' is >= 'row_size'
       50 |         for (col = 1; col < row_size; ++col)
          |                       ^~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:50:9: note: Loop condition is false. Execution continues on line 55
       50 |         for (col = 1; col < row_size; ++col)
          |         ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:59:14: note: The value 0 is assigned to 'col'
       59 |         for (col = 0; col < row_size; ++col)
          |              ^~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:59:23: note: Assuming 'col' is < 'row_size'
       59 |         for (col = 0; col < row_size; ++col)
          |                       ^~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:59:9: note: Loop condition is true.  Entering loop body
       59 |         for (col = 0; col < row_size; ++col)
          |         ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:64:65: note: Assuming 'symmetric_scaled_diff' is > 32768
       64 |             const int16_t saturated_symmetric_scaled_diff = MIN(MAX(symmetric_scaled_diff, Q15_MIN), Q15_MAX);
          |                                                                 ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:185:19: note: expanded from macro 'MAX'
      185 | #define MAX(A, B) MAX_RV(A, B)
          |                   ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:180:23: note: expanded from macro 'MAX_RV'
      180 | #define MAX_RV(A, B) ((A) > (B) ? (A) : (B))
          |                       ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:187:26: note: expanded from macro 'MIN'
      187 | #define MIN(A, B) MIN_RV(A, B)
          |                   ~~~~~~~^~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:181:24: note: expanded from macro 'MIN_RV'
      181 | #define MIN_RV(A, B) ((A) < (B) ? (A) : (B))
          |                        ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:64:65: note: '?' condition is true
       64 |             const int16_t saturated_symmetric_scaled_diff = MIN(MAX(symmetric_scaled_diff, Q15_MIN), Q15_MAX);
          |                                                                 ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:185:19: note: expanded from macro 'MAX'
      185 | #define MAX(A, B) MAX_RV(A, B)
          |                   ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:180:23: note: expanded from macro 'MAX_RV'
      180 | #define MAX_RV(A, B) ((A) > (B) ? (A) : (B))
          |                       ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:64:61: note: '?' condition is false
       64 |             const int16_t saturated_symmetric_scaled_diff = MIN(MAX(symmetric_scaled_diff, Q15_MIN), Q15_MAX);
          |                                                             ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:187:19: note: expanded from macro 'MIN'
      187 | #define MIN(A, B) MIN_RV(A, B)
          |                   ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/../Include/muriscv_nn_support_functions.h:181:23: note: expanded from macro 'MIN_RV'
      181 | #define MIN_RV(A, B) ((A) < (B) ? (A) : (B))
          |                       ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:72:13: note: 'result' initialized here
       72 |             const int16_t result = (base + delta);
          |             ^~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:73:13: note: Assigning the value of 'result'
       73 |             cached_exp_results[col] = result;
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:75:13: note: Value assigned to 'sum'
       75 |             sum += cached_exp_results[col];
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:59:9: note: Loop condition is false. Execution continues on line 78
       59 |         for (col = 0; col < row_size; ++col)
          |         ^
    /home/runner/work/muriscv-nn/muriscv-nn/Source/SoftmaxFunctions/muriscv_nn_softmax_s16.c:81:45: note: The result of left shift is undefined because the right operand is negative
       81 |         const int32_t shifted_sum = (((sum) << (headroom - 1)) + (1 << 13)) >> 14;
          |                                       ~~~~~~^~~~~~~~~~~~~~~~~
  • Source/TransposeFunctions/muriscv_nn_transpose_s8.c:104:22: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'output_w' during its initialization is never read

      104 |             uint8_t *output_w = (uint8_t *)output_h;
          |                      ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Source/TransposeFunctions/muriscv_nn_transpose_s8.c:104:22: note: Value stored to 'output_w' during its initialization is never read
      104 |             uint8_t *output_w = (uint8_t *)output_h;
          |                      ^~~~~~~~   ~~~~~~~~~~~~~~~~~~~
  • Tests/TestCases/Common/Softmax/exp_lut_data.h:22:7: error: [clang-diagnostic-error]

    unknown type name 'q15_t'

       22 | const q15_t softmax_s16_exp_lut[513] = {
          |       ^
  • Tests/TestCases/Common/Softmax/one_by_one_lut_data.h:22:7: error: [clang-diagnostic-error]

    unknown type name 'q15_t'

       22 | const q15_t softmax_s16_one_by_one_lut[513] = {
          |       ^
  • Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:76:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

       76 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:76:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
       76 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
  • Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:126:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      126 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:126:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      126 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
  • Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:176:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      176 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:176:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      176 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
  • Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:226:9: warning: [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]

    Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11

      226 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
    /home/runner/work/muriscv-nn/muriscv-nn/Tests/TestCases/test_muriscv_nn_avgpool_s16/test_muriscv_nn_avgpool_s16.c:226:9: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
      226 |         memset(ctx.buf, 0, ctx.size);
          |         ^~~~~~
  • Tests/TestCases/test_muriscv_nn_convolve_fast_s16/test_muriscv_nn_convolve_fast_s16.c:180:16: error: [clang-diagnostic-implicit-function-declaration]

    call to undeclared function 'muriscv_nn_convolve_fast_s16_get_buffer_size'; ISO C99 and later do not support implicit function declarations

      180 |     buf_size = muriscv_nn_convolve_fast_s16_get_buffer_size(&input_dims, &filter_dims);
          |                ^

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

@PhilippvK
PhilippvK merged commit 8f15b68 into master Nov 2, 2026
113 checks passed
@PhilippvK
PhilippvK deleted the sync branch November 2, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants