[coverity] fix coverity issue
authorDonghyeon Jeong <dhyeon.jeong@samsung.com>
Wed, 14 Aug 2024 11:49:11 +0000 (20:49 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Mon, 19 Aug 2024 07:28:55 +0000 (16:28 +0900)
commit75a2e932ae7cd036f2508a94068ca5ebe1891e7e
treeb82b0a8de89300f9f814bd6a30a1158e45c4c909
parent905a5b11decafa725928a0fcdd3a4e952a94ee0a
[coverity] fix coverity issue

This PR resolves the coverity issues of resource leak, unreachable code, and missing break.

**Changes proposed in this PR:**
- use static arrays instead of dynamic allocation to avoid resource leaks.
- remove unreachable code and add missing break statement.

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

Signed-off-by: Donghyeon Jeong <dhyeon.jeong@samsung.com>
nntrainer/tensor/char_tensor.cpp
nntrainer/tensor/tensor_base.cpp
test/unittest/unittest_nntrainer_tensor.cpp
test/unittest/unittest_nntrainer_tensor_nhwc.cpp