Add -Wuninitialized -Wunused -Wcast-align to warnings checked by kitchen_sink (and fixup warnings) (#125)
This commit is contained in:
committed by
graham sanderson
parent
a59fd524d5
commit
6f94f6a3d7
@ -42,6 +42,11 @@ target_link_libraries(kitchen_sink_libs INTERFACE
|
||||
pico_unique_id
|
||||
pico_util
|
||||
)
|
||||
# todo this is full of warnings atm
|
||||
#if (TARGET tinyusb_device)
|
||||
# target_include_directories(kitchen_sink_libs INTERFACE ${CMAKE_CURRENT_LIST_DIR})
|
||||
# target_link_libraries(kitchen_sink_libs INTERFACE tinyusb_device)
|
||||
#endif()
|
||||
|
||||
add_library(kitchen_sink_options INTERFACE)
|
||||
|
||||
@ -49,23 +54,27 @@ target_compile_options(kitchen_sink_options INTERFACE
|
||||
-Werror
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wno-unused-parameter
|
||||
-Wno-inline
|
||||
# -pedantic
|
||||
|
||||
-Wnull-dereference
|
||||
# -pedantic
|
||||
-Wuninitialized
|
||||
-Wunused
|
||||
-Wcast-align
|
||||
-Wall
|
||||
-Wcast-qual
|
||||
-Wno-deprecated-declarations
|
||||
-Wfloat-equal
|
||||
-Wmissing-format-attribute
|
||||
-Wno-long-long
|
||||
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
|
||||
|
||||
-Wno-inline
|
||||
# todo not sure these are true, but investigate
|
||||
#-Wpacked
|
||||
# todo requires unsigned register constants
|
||||
#-Wconversion
|
||||
|
||||
# todo we have some of these in usb_device_tiny to try to make it more readable.. perhaps doxygen would help here instead
|
||||
#-Wredundant-decls
|
||||
-Wredundant-decls
|
||||
|
||||
-Wno-shadow
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-missing-braces
|
||||
|
@ -27,10 +27,6 @@ bi_decl(bi_block_device(
|
||||
BINARY_INFO_BLOCK_DEV_FLAG_READ | BINARY_INFO_BLOCK_DEV_FLAG_WRITE |
|
||||
BINARY_INFO_BLOCK_DEV_FLAG_PT_UNKNOWN));
|
||||
|
||||
void my_timer(uint i) {
|
||||
puts("XXXX timer");
|
||||
}
|
||||
|
||||
//#pragma GCC push_options
|
||||
//#pragma GCC optimize ("O3")
|
||||
|
||||
@ -87,7 +83,6 @@ int main(void) {
|
||||
dma_channel_configure(0, &config, &dma_to, &dma_from, 1, true);
|
||||
dma_channel_set_config(0, &config, false);
|
||||
|
||||
// timer_start_ms(2, 2000, my_timer);
|
||||
for (int i = 0; i < 20; i++) {
|
||||
puts("sleepy");
|
||||
sleep_ms(1000);
|
||||
|
Reference in New Issue
Block a user