Make examples friendlier for non GCC compilers and fixed slave_mem_i2c.c to compile on boards without I2C pins (#336)

This commit is contained in:
Graham Sanderson
2023-03-10 15:41:40 -06:00
committed by GitHub
parent 9d3fea1419
commit 60829a134a
39 changed files with 89 additions and 86 deletions

View File

@@ -28,8 +28,10 @@ add_subdirectory(hello_world)
add_compile_options(-Wall
-Wno-format # int != int32_t as far as the compiler is concerned because gcc has int32_t as long int
-Wno-unused-function # we have some for the docs that aren't called
-Wno-maybe-uninitialized
)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-maybe-uninitialized)
endif()
# Hardware-specific examples in subdirectories:
add_subdirectory(adc)