Skip to content

Commit 860003b

Browse files
committed
fix: mxchip az3166 compilation errors
1 parent 37ff82f commit 860003b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

MXChip/AZ3166/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ project(mxchip_azure_iot C CXX ASM)
3030
# Disable common networking component, MXCHIP has it's own
3131
set(DISABLE_COMMON_NETWORK true)
3232

33+
# Remove -Werror if it's already set, then apply our compile options
34+
if(CMAKE_CXX_FLAGS MATCHES "-Werror")
35+
string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
36+
endif()
37+
38+
# Add compile options to disable the misleading indentation warning
39+
add_compile_options(-Wno-misleading-indentation)
40+
3341
add_subdirectory(${SHARED_SRC_DIR} shared_src)
3442
add_subdirectory(lib)
3543
add_subdirectory(app)

MXChip/AZ3166/app/wwd_networking.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ static void print_address(CHAR* preable, ULONG address)
4747
{
4848
printf("\t%s: %d.%d.%d.%d\r\n",
4949
preable,
50-
(u_int8_t)(address >> 24),
51-
(u_int8_t)(address >> 16 & 0xFF),
52-
(u_int8_t)(address >> 8 & 0xFF),
53-
(u_int8_t)(address & 0xFF));
50+
(uint8_t)(address >> 24),
51+
(uint8_t)(address >> 16 & 0xFF),
52+
(uint8_t)(address >> 8 & 0xFF),
53+
(uint8_t)(address & 0xFF));
5454
}
5555

5656
/* Join Network. */

0 commit comments

Comments
 (0)