Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coverity] Fix Coverity issue #2946

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Conversation

DonghakPark
Copy link
Member

  1. Resolve FALL_THROUGH : Missing break at the end of case ml::train:TensorDim::DataType::QINT16 at line 285
    --> Add break to exit the case
  2. Resolve LOCAL_VAR : Uninitialized data is read from local variable max_element_idx at int4_tensor.cpp:351
    --> Add initialize

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [X]Passed [ ]Failed [ ]Skipped

@@ -339,7 +339,7 @@ std::vector<unsigned int> Int4QTensor::argmax() const {

for (unsigned int b = 0; b < batch_size; ++b) {
int8_t curr_val, max_val = -8;
unsigned int max_element_idx;
unsigned int max_element_idx = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part was modified in #2944 !

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, i will remove this part

Copy link
Contributor

@baek2sm baek2sm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1. Resolve FALL_THROUGH : Missing break at the end of case ```ml::train:TensorDim::DataType::QINT16``` at line 285
- Add break to exit the case
2. Resolve LOCAL_VAR : Uninitialized data is read from local variable max_element_idx at int4_tensor.cpp:351
- Add initialize

**Self evaluation:**
1. Build test:	 [X]Passed [ ]Failed [ ]Skipped
2. Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <[email protected]>
@myungjoo myungjoo merged commit 2dd6564 into nnstreamer:main Feb 13, 2025
18 of 19 checks passed
@DonghakPark DonghakPark deleted the defect_fix branch February 25, 2025 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants