[Common] fix coverity issue 1035367
authorJaeyun <jy1210.jung@samsung.com>
Wed, 24 Oct 2018 02:35:28 +0000 (11:35 +0900)
committerGeunsik Lim <leemgs@users.noreply.github.com>
Wed, 24 Oct 2018 04:43:41 +0000 (13:43 +0900)
To fix coverity issue, block some lines (logical dead code now)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/nnstreamer/tensor_common.c

index 7e97e03..f178f3f 100644 (file)
@@ -360,7 +360,6 @@ gst_tensor_config_from_video_info (GstTensorConfig * config,
   GstVideoFormat format = GST_VIDEO_FORMAT_UNKNOWN;
   gint width = 0;
   gint height = 0;
-  gint i;
 
   g_return_val_if_fail (config != NULL, FALSE);
   gst_tensor_config_init (config);
@@ -408,11 +407,16 @@ gst_tensor_config_from_video_info (GstTensorConfig * config,
   config->info.dimension[1] = width;
   config->info.dimension[2] = height;
   config->info.dimension[3] = 1; /** Supposed 1 frame in tensor, change this if tensor contains N frames. */
-
+#if 0
+  /**
+   * @todo To fix coverity issue, now block these lines.
+   * If NNS_TENSOR_RANK_LIMIT is larger than 4, unblock these to initialize the tensor dimension.
+   */
+  gint i;
   for (i = 4; i < NNS_TENSOR_RANK_LIMIT; i++) {
     config->info.dimension[i] = 1;
   }
-
+#endif
   return (config->info.type != _NNS_END);
 }