Repository: celix Updated Branches: refs/heads/develop 78bd2627f -> 5d1579aff
CELIX-295: Add -Werror flag for gcc and add some unused attributes to unused variables. Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/5d1579af Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/5d1579af Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/5d1579af Branch: refs/heads/develop Commit: 5d1579affe414cfe9f27684873120e5a64566aef Parents: 78bd262 Author: Pepijn Noltes <pepijnnol...@gmail.com> Authored: Wed Nov 18 15:52:17 2015 +0100 Committer: Pepijn Noltes <pepijnnol...@gmail.com> Committed: Wed Nov 18 15:52:17 2015 +0100 ---------------------------------------------------------------------- CMakeLists.txt | 3 +++ .../private/include/endpoint_descriptor_common.h | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/5d1579af/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index ece5748..7c7497b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,9 @@ ENDIF() IF(UNIX) SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall ${CMAKE_C_FLAGS}") ENDIF() +IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + SET(CMAKE_C_FLAGS "-Werror ${CMAKE_C_FLAGS}") +ENDIF() IF(UNIX AND NOT APPLE) SET(CMAKE_C_FLAGS "-pthread ${CMAKE_C_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "-pthread ${CMAKE_EXE_LINKER_FLAGS}") http://git-wip-us.apache.org/repos/asf/celix/blob/5d1579af/remote_services/discovery/private/include/endpoint_descriptor_common.h ---------------------------------------------------------------------- diff --git a/remote_services/discovery/private/include/endpoint_descriptor_common.h b/remote_services/discovery/private/include/endpoint_descriptor_common.h index e35ecc7..a186a18 100644 --- a/remote_services/discovery/private/include/endpoint_descriptor_common.h +++ b/remote_services/discovery/private/include/endpoint_descriptor_common.h @@ -43,15 +43,15 @@ typedef enum { VALUE_TYPE_SHORT, } valueType; -static const xmlChar* XML = (const xmlChar*) "xml"; -static const xmlChar* XMLNS = (const xmlChar*) "http://www.osgi.org/xmlns/rsa/v1.0.0"; +static const __attribute__((unused)) xmlChar* XML = (const xmlChar*) "xml"; +static const __attribute__((unused)) xmlChar* XMLNS = (const xmlChar*) "http://www.osgi.org/xmlns/rsa/v1.0.0"; -static const xmlChar* ENDPOINT_DESCRIPTIONS = (const xmlChar*) "endpoint-descriptions"; +static const __attribute__((unused)) xmlChar* ENDPOINT_DESCRIPTIONS = (const xmlChar*) "endpoint-descriptions"; static const xmlChar* ENDPOINT_DESCRIPTION = (const xmlChar*) "endpoint-description"; static const xmlChar* ARRAY = (const xmlChar*) "array"; -static const xmlChar* LIST = (const xmlChar*) "list"; -static const xmlChar* SET = (const xmlChar*) "set"; +static const __attribute__((unused)) xmlChar* LIST = (const xmlChar*) "list"; +static const __attribute__((unused)) xmlChar* SET = (const xmlChar*) "set"; static const xmlChar* PROPERTY = (const xmlChar*) "property"; static const xmlChar* NAME = (const xmlChar*) "name";