From: Inki Dae Date: Thu, 2 Jan 2025 06:51:45 +0000 (+0900) Subject: fix coverity issue X-Git-Tag: accepted/tizen/9.0/unified/20250103.170651^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_9.0;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git fix coverity issue Fix below coverity issues to unitialized variable by initializing all members of inference_engine_tensor_info structure correctly. CIDs : 1147940, 1148012, 1825083, 1826186 and 1828010 Change-Id: Ia213f2343bd867166f357cadd974bdd4a638e5ae Signed-off-by: Inki Dae --- diff --git a/include/inference_engine_type.h b/include/inference_engine_type.h index 19cfc7a..72f6d10 100644 --- a/include/inference_engine_type.h +++ b/include/inference_engine_type.h @@ -221,12 +221,12 @@ extern "C" */ typedef struct _inference_engine_tensor_info { std::vector shape; /**< a tensor shape. */ - inference_tensor_shape_type_e shape_type; /**< a tensor shape of the layer. */ - inference_tensor_data_type_e data_type; /**< a tensor type of the layer. */ - size_t size; /** tensor element size. The size should be height * width * channel count */ - float scale; /**< a scale value of the layer. */ - int zero_point; /**< a zero point value of the layer. */ - inference_tensor_quantization_type_e quantization_type; /**< a quantization type of the layer. */ + inference_tensor_shape_type_e shape_type { INFERENCE_TENSOR_SHAPE_NCHW }; /**< a tensor shape of the layer. */ + inference_tensor_data_type_e data_type { INFERENCE_TENSOR_DATA_TYPE_NONE }; /**< a tensor type of the layer. */ + size_t size {}; /** tensor element size. The size should be height * width * channel count */ + float scale {}; /**< a scale value of the layer. */ + int zero_point {}; /**< a zero point value of the layer. */ + inference_tensor_quantization_type_e quantization_type { INFERENCE_TENSOR_QUANTIZATION_NONE }; /**< a quantization type of the layer. */ // TODO. } inference_engine_tensor_info;