Make kitchen_sink check param assertions, and include all headers - fix sign-compare warnings (#316)

This commit is contained in:
Graham Sanderson
2021-04-06 20:50:26 -05:00
committed by GitHub
parent 0911393fe2
commit 92f948c123
6 changed files with 53 additions and 19 deletions

View File

@ -66,6 +66,7 @@ target_compile_options(kitchen_sink_options INTERFACE
-Wfloat-equal
-Wmissing-format-attribute
-Wconversion
-Wsign-compare
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
-Wno-inline
@ -85,7 +86,7 @@ target_compile_options(kitchen_sink_options INTERFACE
)
target_compile_definitions(kitchen_sink_libs INTERFACE
NDEBUG
PARAM_ASSERTIONS_ENABLE_ALL=1 # want to check all the assertions for compilation warnings
PICO_AUDIO_DMA_IRQ=1
)

View File

@ -5,18 +5,44 @@
*/
#include <stdio.h>
#include "pico/stdlib.h"
#include "pico/time.h"
// Include all headers to check for compiler warnings
#include "hardware/adc.h"
#include "hardware/claim.h"
#include "hardware/clocks.h"
#include "hardware/divider.h"
#include "hardware/dma.h"
#include "pico/bit_ops.h"
#include "hardware/flash.h"
#include "hardware/gpio.h"
#include "hardware/i2c.h"
#include "hardware/pwm.h"
#include "hardware/pio.h"
#include "hardware/interp.h"
#include "hardware/irq.h"
#include "hardware/pio.h"
#include "hardware/pll.h"
#include "hardware/pwm.h"
#include "hardware/resets.h"
#include "hardware/rtc.h"
#include "hardware/spi.h"
#include "hardware/sync.h"
#include "hardware/timer.h"
#include "pico/divider.h"
#include "pico/critical_section.h"
#include "hardware/uart.h"
#include "hardware/vreg.h"
#include "hardware/watchdog.h"
#include "hardware/xosc.h"
#include "pico/binary_info.h"
#include "pico/bit_ops.h"
#include "pico/bootrom.h"
#include "pico/divider.h"
#include "pico/double.h"
#include "pico/fix/rp2040_usb_device_enumeration.h"
#include "pico/float.h"
#include "pico/int64_ops.h"
#include "pico/malloc.h"
#include "pico/multicore.h"
#include "pico/printf.h"
#include "pico/stdlib.h"
#include "pico/sync.h"
#include "pico/time.h"
#include "pico/unique_id.h"
bi_decl(bi_block_device(
BINARY_INFO_MAKE_TAG('K', 'S'),