diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-01-29 16:39:50 +0100 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-01-29 17:22:02 +0100 |
commit | 92bce6034ead88d1a11b5bdacd975a9d4cbec795 (patch) | |
tree | be7a991d732881bae27664919e3fc9860327fc26 | |
parent | 317c2f8e695de186487347117296faa04ed42269 (diff) |
[HICN-10] Treat warning as errors in compilation during verify jobs.
Change-Id: Iab6deb14157f81c9f2f8ba6762e93e9860b108bd
Signed-off-by: Mauro Sardara <msardara@cisco.com>
-rwxr-xr-x | CMakeLists.txt | 16 | ||||
-rwxr-xr-x | cmake/Modules/Packager.cmake | 4 | ||||
-rwxr-xr-x | hicn-light/src/command_line/daemon/hicnLightDaemon_main.c | 2 | ||||
-rw-r--r-- | libtransport/src/hicn/transport/core/raw_socket_interface.cc | 2 | ||||
-rwxr-xr-x | utils/src/ping_client.cc | 2 |
5 files changed, 16 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a362a4005..29fa1700b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,13 +39,17 @@ set(LIBTRANSPORT_HEADER_FILES) set(SUBDIRS lib hicn-light libtransport utils) +add_compile_options(-Wall -Werror) + if (BUILD_VPP_PLUGIN AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" ) -list(APPEND SUBDIRS - hicn-plugin -) -list(APPEND HICN_BINARY_API_INCLUDE_DIRS - ${PROJECT_BINARY_DIR}/hicn-plugin - ${PROJECT_BINARY_DIR}/hicn-plugin/vpp_plugins) + list(APPEND SUBDIRS + hicn-plugin + ) + + list(APPEND HICN_BINARY_API_INCLUDE_DIRS + ${PROJECT_BINARY_DIR}/hicn-plugin + ${PROJECT_BINARY_DIR}/hicn-plugin/vpp_plugins + ) endif() foreach(dir ${SUBDIRS}) diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake index 9a64488e4..f5b7a8ca2 100755 --- a/cmake/Modules/Packager.cmake +++ b/cmake/Modules/Packager.cmake @@ -84,7 +84,7 @@ macro(make_packages) foreach(lc ${components}) string(TOUPPER ${lc} uc) set(CPACK_${type}_${uc}_FILE_NAME "${lc}_${deb_ver}_${arch}.deb") - + set(DEB_DEPS) if (NOT ${${lc}_DEB_DEPENDENCIES} STREQUAL "") string(REPLACE "stable_version" ${tag} DEB_DEPS ${${lc}_DEB_DEPENDENCIES}) @@ -115,7 +115,7 @@ macro(make_packages) endif() set(CPACK_${type}_${uc}_PACKAGE_REQUIRES "${RPM_DEPS}") - + if(${lc} MATCHES ".*-dev") set(package_name ${lc}el) else() diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c index f6d521711..415e98d65 100755 --- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c +++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c @@ -158,7 +158,7 @@ static void _daemonize(void) { } int forkReturn = fork(); - parcTrapUnexpectedStateIf(forkReturn < 0, "Fork error"); + parcTrapUnexpectedStateIf(forkReturn < 0, "Fork error") if (forkReturn > 0) { // parent exits diff --git a/libtransport/src/hicn/transport/core/raw_socket_interface.cc b/libtransport/src/hicn/transport/core/raw_socket_interface.cc index 37aaff7e0..4cf7b2ca6 100644 --- a/libtransport/src/hicn/transport/core/raw_socket_interface.cc +++ b/libtransport/src/hicn/transport/core/raw_socket_interface.cc @@ -41,7 +41,7 @@ void RawSocketInterface::connect(bool is_consumer) { } // Get interface ip address - struct sockaddr_in6 address; + struct sockaddr_in6 address = {0}; utils::retrieveInterfaceAddress(output_interface_, &address); inet6_address_.family = address.sin6_family; diff --git a/utils/src/ping_client.cc b/utils/src/ping_client.cc index c3bfa4086..e98a8b422 100755 --- a/utils/src/ping_client.cc +++ b/utils/src/ping_client.cc @@ -97,6 +97,8 @@ class Client : interface::BasePortal::ConsumerCallback { } } + virtual ~Client() {} + void ping() { std::cout << "start ping" << std::endl; doPing(); |