From: Yongjoo Ahn Date: Tue, 18 Feb 2020 01:28:07 +0000 (+0900) Subject: [Coverity] Fix uncaught exceptions CID: 1123680, 1123739 X-Git-Tag: submit/tizen/20200220.043100~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c91cf42564fb7b514c791fdf8401a2416f06443c;p=platform%2Fupstream%2Fnnstreamer.git [Coverity] Fix uncaught exceptions CID: 1123680, 1123739 Fix coverity issues caused by uncaught exceptions Signed-off-by: Yongjoo Ahn --- diff --git a/tests/tizen_capi/unittest_tizen_sensor.cc b/tests/tizen_capi/unittest_tizen_sensor.cc index 03aaaab..55e9865 100644 --- a/tests/tizen_capi/unittest_tizen_sensor.cc +++ b/tests/tizen_capi/unittest_tizen_sensor.cc @@ -437,14 +437,25 @@ TEST (tizensensor_as_source, virtual_sensor_flow_05_n) */ int main (int argc, char **argv) { - int result; + int result = -1; - testing::InitGoogleTest (&argc, argv); + try { + testing::InitGoogleTest (&argc, argv); + } catch (...) { + g_warning ("catch 'testing::internal::::ClassUniqueToAlwaysTrue'"); + } + + /* ignore tizen feature status while running the testcases */ set_feature_state (1); gst_init (&argc, &argv); - result = RUN_ALL_TESTS (); + try { + result = RUN_ALL_TESTS (); + } catch (...) { + g_warning ("catch `testing::internal::GoogleTestFailureException`"); + } set_feature_state (-1); + return result; }