From: Kwanghoon Son Date: Mon, 10 Apr 2023 00:23:56 +0000 (+0900) Subject: Check std::remove return X-Git-Tag: accepted/tizen/unified/20230411.161303^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f17d1b0028df907fd5daeba7c86bdd19edce8d4d;p=platform%2Fcore%2Fapi%2Fmediavision.git Check std::remove return Coverity reports 1667814 Unchecked return value from library Change-Id: I93f661373195ad50ebd4fab5dd4d65e26cc04d3e Signed-off-by: Kwanghoon Son --- diff --git a/test/testsuites/barcode/test_barcode.cpp b/test/testsuites/barcode/test_barcode.cpp index d57a2fb4..90e82257 100644 --- a/test/testsuites/barcode/test_barcode.cpp +++ b/test/testsuites/barcode/test_barcode.cpp @@ -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); } } diff --git a/test/testsuites/barcode/test_designqr.cpp b/test/testsuites/barcode/test_designqr.cpp index bafbd5d1..e267dae5 100644 --- a/test/testsuites/barcode/test_designqr.cpp +++ b/test/testsuites/barcode/test_designqr.cpp @@ -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 }