Enable extra warnings

This commit is contained in:
fruchti 2020-07-18 17:09:33 +02:00
parent fc86561e4c
commit 1ac5190ea5
3 changed files with 4 additions and 4 deletions

View file

@ -1 +1 @@
553
558

View file

@ -23,7 +23,7 @@ endif
CFLAGS = -mcpu=cortex-m3 -mthumb \
-Os -fno-common -Werror \
-nostartfiles \
-Wall -Xlinker --gc-sections \
-Wall -Wextra -Xlinker --gc-sections \
-D$(H_DEVICE) -D_DEFAULT_SOURCE -T$(LD_SCRIPT) \
-Wl,-Map=$(BUILD_DIR)/$(PROJECT).map -std=c99 \
$(addprefix -I,$(SOURCE_DIRS) $(INCLUDE_DIRS)) $(DEBUG_FLAGS)

View file

@ -413,7 +413,7 @@ void ADC1_2_IRQHandler(void)
// Find first temperature higher than the measured one
int lower_entry = 0;
for(int i = 1; i < sizeof(READINGS) / sizeof(READINGS[0]); i++)
for(unsigned int i = 1; i < sizeof(READINGS) / sizeof(READINGS[0]); i++)
{
if(adc >= READINGS[i])
{
@ -421,7 +421,7 @@ void ADC1_2_IRQHandler(void)
break;
}
}
int higher_entry = lower_entry + 1;
unsigned int higher_entry = lower_entry + 1;
int temp = lower_entry * 5 - 40; // Temperature in °C
// Interpolate linearly