Fix gcc warning 81/250181/2
authorKwang Son <k.son@samsung.com>
Tue, 22 Dec 2020 00:54:51 +0000 (09:54 +0900)
committerkwang son <k.son@samsung.com>
Tue, 22 Dec 2020 00:57:38 +0000 (00:57 +0000)
Change-Id: Ia0da73f38c5837a7b92e714167ebb552e370e091
Signed-off-by: Kwang Son <k.son@samsung.com>
mv_face/face/src/mv_face.c
mv_surveillance/surveillance/src/mv_mask_buffer.c
mv_surveillance/surveillance/src/mv_surveillance.c
test/testsuites/common/testsuite_common/mv_testsuite_common.c
test/testsuites/face/face_test_suite.c
test/testsuites/inference/inference_test_suite.c

index a8d2827..8bd0094 100644 (file)
@@ -39,8 +39,8 @@ static int check_source_roi_quadrangle(mv_quadrangle_s *roi, mv_source_h source)
        int ret = MEDIA_VISION_ERROR_NONE;
 
        if (roi) {
-               int src_w = 0;
-               int src_h = 0;
+               unsigned int src_w = 0;
+               unsigned int src_h = 0;
 
                ret = mv_source_get_width(source, &src_w);
                if (ret != MEDIA_VISION_ERROR_NONE) {
@@ -73,8 +73,8 @@ static int check_source_roi(mv_rectangle_s *roi, mv_source_h source)
        int ret = MEDIA_VISION_ERROR_NONE;
 
        if (roi) {
-               int src_w = 0;
-               int src_h = 0;
+               unsigned int src_w = 0;
+               unsigned int src_h = 0;
 
                ret = mv_source_get_width(source, &src_w);
                if (ret != MEDIA_VISION_ERROR_NONE) {
index af06e61..bef8bd0 100644 (file)
@@ -20,6 +20,7 @@
 #include "mv_private.h"
 
 #include <stdio.h>
+#include <stdlib.h>
 
 int mv_get_mask_buffer(
        unsigned int buffer_width,
index 48ebc82..f2bd626 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <stdlib.h>
 #include "mv_surveillance.h"
 
 #include "mv_surveillance_private.h"
index c5fb3fc..7fff842 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 void print_fail_result(
                const char *action_name,
index a94737e..f74b21c 100644 (file)
@@ -78,6 +78,8 @@ void face_expression_cb(
        case MV_FACE_UNKNOWN:
                printf("Face expression isn't recognized");
                break;
+       default:
+               printf("Face expression number %u called", facial_expression);
        }
 }
 
@@ -1815,8 +1817,6 @@ int process_image_file(
        if (track_target_file_name == NULL)
                return MEDIA_VISION_ERROR_INVALID_PARAMETER;
 
-       image_data_s image_info;
-
        int frame_idx;
        int err = MEDIA_VISION_ERROR_NONE;
        int frames_counter = 0;
index 9904dcf..cc03f8c 100644 (file)
@@ -2401,7 +2401,7 @@ int perform_pose_landmark_detection()
 
        int sel_opt = 0;
        const int options[] = { 1, 2, 3, 4, 5 };
-       const *names[] = { "Configuration",
+       const char *names[] = { "Configuration",
                                                "TFLITE(CPU) + CPM",
                                                "Prepare",
                                                "Run",
@@ -2492,7 +2492,7 @@ int perform_pose_landmark_detection()
                        if (err != MEDIA_VISION_ERROR_NONE) {
                                int err2 = mv_destroy_source(mvSource);
                                if (err2 != MEDIA_VISION_ERROR_NONE)
-                                       printf("Fail to destroy mvSource.\n", err2);
+                                       printf("Fail to destroy mvSource err: %d.\n", err2);
                                mvSource = NULL;
                                free(in_file_name);
                                break;
@@ -2545,7 +2545,7 @@ int perform_pose_landmark_detection()
 
                int do_another = 0;
                if (err != MEDIA_VISION_ERROR_NONE) {
-                       printf("ERROR: Action is finished with error code: %i\n");
+                       printf("ERROR: Action is finished with error code: %i\n", err);
                }
 
                sel_opt = 0;