enable more compiler warnings

This commit is contained in:
Martin Brodbeck 2024-02-13 09:11:28 +01:00
parent 6970ca8182
commit c88d712a9f
2 changed files with 6 additions and 5 deletions

View file

@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 17)
# Initialise pico_sdk from installed location # Initialise pico_sdk from installed location
# (note this can come from environment, CMake cache etc) # (note this can come from environment, CMake cache etc)
#set(PICO_SDK_PATH "/home/brodbemn/pico/pico-sdk") #set(PICO_SDK_PATH "/home/myuser/pico/pico-sdk")
set(PICO_BOARD pico CACHE STRING "Board type") set(PICO_BOARD pico CACHE STRING "Board type")
@ -23,18 +23,19 @@ project(raspi_keyer C CXX ASM)
# Initialise the Raspberry Pi Pico SDK # Initialise the Raspberry Pi Pico SDK
pico_sdk_init() pico_sdk_init()
# Add executable. Default name is the project name, version 0.1 # Add executable. Default name is the project name
add_executable(raspi_keyer) add_executable(raspi_keyer)
add_subdirectory(src) add_subdirectory(src)
pico_set_program_name(raspi_keyer "raspi_keyer") pico_set_program_name(raspi_keyer "raspi_keyer")
pico_set_program_version(raspi_keyer "0.1") pico_set_program_version(raspi_keyer "0.0.1")
pico_enable_stdio_uart(raspi_keyer 1) pico_enable_stdio_uart(raspi_keyer 1)
pico_enable_stdio_usb(raspi_keyer 0) pico_enable_stdio_usb(raspi_keyer 0)
target_compile_options(raspi_keyer PRIVATE -Wall -Wextra -Werror)
# Add the standard library to the build # Add the standard library to the build
target_link_libraries(raspi_keyer target_link_libraries(raspi_keyer
pico_stdlib) pico_stdlib)

View file

@ -13,7 +13,7 @@ namespace
void flash_store_callback(void *settings) void flash_store_callback(void *settings)
{ {
int writeSize = (sizeof(struct Settings) / FLASH_PAGE_SIZE) + 1; //int writeSize = (sizeof(struct Settings) / FLASH_PAGE_SIZE) + 1;
flash_range_erase(FLASH_TARGET_OFFSET, FLASH_SECTOR_SIZE); flash_range_erase(FLASH_TARGET_OFFSET, FLASH_SECTOR_SIZE);
flash_range_program(FLASH_TARGET_OFFSET, (uint8_t *)settings, FLASH_PAGE_SIZE); flash_range_program(FLASH_TARGET_OFFSET, (uint8_t *)settings, FLASH_PAGE_SIZE);