Fix declaration-after-statement error for gcc9 25/221125/3 accepted/tizen/unified/20200102.220743 submit/tizen/20200102.133410
authorJihoon Jung <jh8801.jung@samsung.com>
Fri, 27 Dec 2019 17:28:22 +0000 (02:28 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Tue, 31 Dec 2019 13:29:03 +0000 (22:29 +0900)
Change-Id: Id6ba9fdb2e8eb3dfa0df0ed992dbad66e4e91cb3
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
CMakeLists.txt
src/wmesh-interface.c

index cb1b80f..cd69f6b 100644 (file)
@@ -25,7 +25,7 @@ FOREACH(flag ${daemon_pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -Wall -Werror-implicit-function-declaration -Werror -Wextra -Wdeclaration-after-statement -Wmissing-declarations -Wredundant-decls -Wcast-align -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -Wall -Werror-implicit-function-declaration -Werror -Wdeclaration-after-statement -Wmissing-declarations -Wredundant-decls -Wcast-align -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable")
 IF (BUILD_GTESTS)
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=default")
 ELSE (BUILD_GTESTS)
index 81a8fc2..78dc6f9 100644 (file)
@@ -355,12 +355,13 @@ int wmesh_interface_check_external_exists(const char* external_interface, bool *
        /* TODO: Current logic checks only ethernet interface.
                        This logic should consider wireless interface if can */
        int ret = WMESHD_ERROR_NONE;
+       bool ex = false;
        cable_state_e cable_state = ETHERNET_CABLE_DETACHED;
 
        if (NULL == external_interface || NULL == state)
                return WMESHD_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
 
-       bool ex = _check_interface_exists(external_interface);
+       ex = _check_interface_exists(external_interface);
        if (FALSE == ex) {
                /* LCOV_EXCL_START */
                WMESH_LOGE("External interface[%s] was not found.", external_interface);