diff --git a/.gitmodules b/.gitmodules index 0ed0313b..898e6456 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/P-p-H-d/mlib.git [submodule "lib/STM32CubeWB"] path = lib/STM32CubeWB - url = https://github.com/STMicroelectronics/STM32CubeWB.git + url = https://github.com/Flipper-Zero/STM32CubeWB.git [submodule "applications/floopper-bloopper"] path = applications/floopper-bloopper url = https://github.com/glitchcore/floopper-bloopper.git diff --git a/applications/irda/irda.c b/applications/irda/irda.c index 22297d57..e386719c 100644 --- a/applications/irda/irda.c +++ b/applications/irda/irda.c @@ -127,7 +127,7 @@ void render_packet(Canvas* canvas, State* state) { char buf[24]; sprintf( buf, - "P[%d]: %s 0x%X 0x%X", + "P[%d]: %s 0x%lX 0x%lX", state->packet_id, protocol, state->packets[state->packet_id].address, diff --git a/applications/lf-rfid/lf-rfid.c b/applications/lf-rfid/lf-rfid.c index 2ce83f25..b1bb1691 100644 --- a/applications/lf-rfid/lf-rfid.c +++ b/applications/lf-rfid/lf-rfid.c @@ -133,7 +133,7 @@ static void extract_data(uint8_t* buf, uint8_t* customer, uint32_t* em_data) { uint32_t bit = buf[line * (ROW_SIZE + 1) + col]; data |= bit << (7 - offset); - printf("%d ", bit); + printf("%ld ", bit); offset++; } @@ -150,7 +150,7 @@ static void extract_data(uint8_t* buf, uint8_t* customer, uint32_t* em_data) { uint32_t bit = buf[line * (ROW_SIZE + 1) + col]; data |= bit << (31 - offset); - printf("%d ", bit); + printf("%ld ", bit); offset++; } diff --git a/applications/sd-filesystem/sd-filesystem-api.c b/applications/sd-filesystem/sd-filesystem-api.c index 7301fd5b..426c9b5d 100644 --- a/applications/sd-filesystem/sd-filesystem-api.c +++ b/applications/sd-filesystem/sd-filesystem-api.c @@ -318,7 +318,6 @@ uint64_t fs_file_tell(File* file) { // Truncate file size to current pointer value bool fs_file_truncate(File* file) { FileData* filedata = NULL; - uint64_t position = 0; file->internal_error_id = _get_file(fs_info, file, &filedata); @@ -478,7 +477,7 @@ fs_common_info(const char* path, FileInfo* fileinfo, char* name, const uint16_t if(fresult == SD_OK) { fresult = f_stat(path, &_fileinfo); - if(fresult == FR_OK) { + if((FRESULT)fresult == FR_OK) { if(fileinfo != NULL) { fileinfo->date.value = _fileinfo.fdate; fileinfo->time.value = _fileinfo.ftime; @@ -592,7 +591,7 @@ FS_Error fs_get_fs_info(uint64_t* total_space, uint64_t* free_space) { FATFS* fs; fresult = f_getfree("0:/", &free_clusters, &fs); - if(fresult == FR_OK) { + if((FRESULT)fresult == FR_OK) { uint32_t total_sectors = (fs->n_fatent - 2) * fs->csize; uint32_t free_sectors = free_clusters * fs->csize; diff --git a/core/furi/memmgr.c b/core/furi/memmgr.c index e84bbc0e..d7330375 100644 --- a/core/furi/memmgr.c +++ b/core/furi/memmgr.c @@ -43,7 +43,8 @@ void* calloc(size_t count, size_t size) { } char* strdup(const char* s) { - if(s == NULL) { + const char* s_null = s; + if(s_null == NULL) { return NULL; } diff --git a/firmware/Makefile b/firmware/Makefile index 838dfd62..c592bee4 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,9 +1,6 @@ PROJECT_ROOT = $(abspath $(dir $(abspath $(firstword $(MAKEFILE_LIST))))..) PROJECT = firmware -CFLAGS += -Werror -CPPFLAGS += -Werror - include $(PROJECT_ROOT)/make/base.mk include $(PROJECT_ROOT)/assets/assets.mk include $(PROJECT_ROOT)/core/core.mk @@ -11,6 +8,9 @@ include $(PROJECT_ROOT)/make/git.mk include $(PROJECT_ROOT)/applications/applications.mk include $(PROJECT_ROOT)/lib/lib.mk +CFLAGS += -Werror +CPPFLAGS += -Werror + TARGET ?= f4 TARGET_DIR = targets/$(TARGET) diff --git a/firmware/targets/f4/api-hal/api-interrupts.c b/firmware/targets/f4/api-hal/api-interrupts.c index 56c42c4e..3aff02f9 100644 --- a/firmware/targets/f4/api-hal/api-interrupts.c +++ b/firmware/targets/f4/api-hal/api-interrupts.c @@ -32,5 +32,5 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim) { /* External interrupt event */ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { - api_interrupt_call(InterruptTypeExternalInterrupt, GPIO_Pin); + api_interrupt_call(InterruptTypeExternalInterrupt, (void*)(uint32_t)GPIO_Pin); } \ No newline at end of file diff --git a/lib/STM32CubeWB b/lib/STM32CubeWB index 17fe6be7..1c15728a 160000 --- a/lib/STM32CubeWB +++ b/lib/STM32CubeWB @@ -1 +1 @@ -Subproject commit 17fe6be729cbb8c2a92cff3be3d16696c1d3fc8a +Subproject commit 1c15728a3c08e42919024e2a3781862f7d6c86d7 diff --git a/lib/onewire/one_wire_master.cpp b/lib/onewire/one_wire_master.cpp index f21d8db1..6c236b67 100644 --- a/lib/onewire/one_wire_master.cpp +++ b/lib/onewire/one_wire_master.cpp @@ -1,4 +1,3 @@ -#pragma once #include "one_wire_master.h" #include "one_wire_timings.h" diff --git a/lib/onewire/one_wire_slave.cpp b/lib/onewire/one_wire_slave.cpp index 288eb513..51e0b0e6 100644 --- a/lib/onewire/one_wire_slave.cpp +++ b/lib/onewire/one_wire_slave.cpp @@ -218,7 +218,7 @@ void OneWireSlave::cmd_search_rom(void) { if(!send_bit(bit)) return; if(!send_bit(!bit)) return; - const bool bit_recv = receive_bit(); + receive_bit(); if(error != OneWireSlaveError::NO_ERROR) return; } } @@ -263,7 +263,7 @@ bool OneWireSlave::bus_start(void) { __disable_irq(); // TODO think about multiple command cycles - bool return_to_reset = receive_and_process_cmd(); + receive_and_process_cmd(); result = (error == OneWireSlaveError::NO_ERROR || error == OneWireSlaveError::INCORRECT_ONEWIRE_CMD);