Check std::remove return 91/291091/2 accepted/tizen/unified/20230411.161303
authorKwanghoon Son <k.son@samsung.com>
Mon, 10 Apr 2023 00:23:56 +0000 (09:23 +0900)
committerKwanghoon Son <k.son@samsung.com>
Mon, 10 Apr 2023 03:27:39 +0000 (12:27 +0900)
Coverity reports 1667814 Unchecked return value from library

Change-Id: I93f661373195ad50ebd4fab5dd4d65e26cc04d3e
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
test/testsuites/barcode/test_barcode.cpp
test/testsuites/barcode/test_designqr.cpp

index d57a2fb..90e8225 100644 (file)
@@ -106,7 +106,7 @@ protected:
        void TearDown() override
        {
                if (access(test_file.c_str(), F_OK) != -1) {
-                       std::remove(test_file.c_str());
+                       EXPECT_EQ(std::remove(test_file.c_str()), 0);
                }
        }
 
index bafbd5d..e267dae 100644 (file)
@@ -26,7 +26,7 @@ protected:
                ASSERT_EQ(mv_destroy_engine_config(engine_cfg), MEDIA_VISION_ERROR_NONE);
 #ifndef SAVE_QR_IMG
                if (access(test_file.c_str(), F_OK) != -1) {
-                       std::remove(test_file.c_str());
+                       EXPECT_EQ(std::remove(test_file.c_str()), 0);
                }
 #endif
        }