diff --git a/MXChip/AZ3166/CMakeLists.txt b/MXChip/AZ3166/CMakeLists.txt index 3a744409..08a689e0 100644 --- a/MXChip/AZ3166/CMakeLists.txt +++ b/MXChip/AZ3166/CMakeLists.txt @@ -30,6 +30,14 @@ project(mxchip_azure_iot C CXX ASM) # Disable common networking component, MXCHIP has it's own set(DISABLE_COMMON_NETWORK true) +# Remove -Werror if it's already set, then apply our compile options +if(CMAKE_CXX_FLAGS MATCHES "-Werror") + string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +endif() + +# Add compile options to disable the misleading indentation warning +add_compile_options(-Wno-misleading-indentation) + add_subdirectory(${SHARED_SRC_DIR} shared_src) add_subdirectory(lib) add_subdirectory(app) diff --git a/MXChip/AZ3166/app/wwd_networking.c b/MXChip/AZ3166/app/wwd_networking.c index f51155c0..e2447454 100644 --- a/MXChip/AZ3166/app/wwd_networking.c +++ b/MXChip/AZ3166/app/wwd_networking.c @@ -47,10 +47,10 @@ static void print_address(CHAR* preable, ULONG address) { printf("\t%s: %d.%d.%d.%d\r\n", preable, - (u_int8_t)(address >> 24), - (u_int8_t)(address >> 16 & 0xFF), - (u_int8_t)(address >> 8 & 0xFF), - (u_int8_t)(address & 0xFF)); + (uint8_t)(address >> 24), + (uint8_t)(address >> 16 & 0xFF), + (uint8_t)(address >> 8 & 0xFF), + (uint8_t)(address & 0xFF)); } /* Join Network. */