From: Hwankyu Jhun Date: Fri, 21 Apr 2023 04:18:03 +0000 (+0000) Subject: Fix build error for gcc 12.2.0 X-Git-Tag: accepted/tizen/unified/20230705.063732~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F291763%2F1;p=platform%2Fcore%2Fappfw%2Ftidl.git Fix build error for gcc 12.2.0 - Add warning ignore option about maybe-uninitialized - Fix unit test - Add a blank line for compilation Change-Id: Ib5fde77d41e8fbffb396eb5b76e7257c557bd947 Signed-off-by: Hwankyu Jhun --- diff --git a/idlc/gen_cion/default_cpp_transportable.cc b/idlc/gen_cion/default_cpp_transportable.cc index 8f1d0f5..103c4f8 100644 --- a/idlc/gen_cion/default_cpp_transportable.cc +++ b/idlc/gen_cion/default_cpp_transportable.cc @@ -431,7 +431,8 @@ R"__c_cb(if (group_ != nullptr) { int ret = cion_group_unsubscribe(group_); if (ret != CION_ERROR_NONE) _E("Failed to unsubscribe. error(%d)", ret); - cion_group_destroy(group_); + + cion_group_destroy(group_); } if (cion_security_ != nullptr) diff --git a/tests/build_tests/CMakeLists.txt b/tests/build_tests/CMakeLists.txt index 672daf8..dc629f9 100644 --- a/tests/build_tests/CMakeLists.txt +++ b/tests/build_tests/CMakeLists.txt @@ -18,8 +18,8 @@ FOREACH(flag ${PKGS_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror -Wno-maybe-uninitialized") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE -Werror -Wno-maybe-uninitialized") SET(CMAKE_EXE_LINKER_FLAGS "-pie -Wl,--as-needed") AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TIDL_BUILD_TESTS_SRCS) diff --git a/tests/unit_tests/element_unittest.cc b/tests/unit_tests/element_unittest.cc index 19e730c..d001c47 100644 --- a/tests/unit_tests/element_unittest.cc +++ b/tests/unit_tests/element_unittest.cc @@ -59,7 +59,7 @@ class ElementsTest : public testing::Test { }; TEST_F(ElementsTest, Elements_Constructor) { - tidl::Elements elms(); + tidl::Elements elms; } TEST_F(ElementsTest, Elements_Add) {