Fix SITL warnings

This commit is contained in:
Petr Ledvina 2017-05-11 13:39:32 +02:00
parent 4c063b5875
commit 58212464c5
5 changed files with 10 additions and 11 deletions

View File

@ -146,7 +146,7 @@ uint32_t IO_EXTI_Line(IO_t io)
#elif defined(STM32F7)
return 1 << IO_GPIOPinIdx(io);
#elif defined(SIMULATOR_BUILD)
return 1;
return 0;
#else
# error "Unknown target type"
#endif

View File

@ -90,10 +90,10 @@ uint32_t stackUsedSize(void)
uint32_t stackTotalSize(void)
{
return (uint32_t)&_Min_Stack_Size;
return (uint32_t)(intptr_t)&_Min_Stack_Size;
}
uint32_t stackHighMem(void)
{
return (uint32_t)&_estack;
return (uint32_t)(intptr_t)&_estack;
}

View File

@ -445,7 +445,7 @@ static void cliSetVar(const clivalue_t *var, const cliVar_t value)
}
}
#ifndef MINIMAL_CLI
#if defined(USE_RESOURCE_MGMT) && !defined(MINIMAL_CLI)
static void cliRepeat(char ch, uint8_t len)
{
for (int i = 0; i < len; i++) {

View File

@ -70,6 +70,10 @@ bool baroDetect(baroDev_t *dev, baroSensor_e baroHardwareToUse)
baroSensor_e baroHardware = baroHardwareToUse;
#if !defined(USE_BARO_BMP085) && !defined(USE_BARO_MS5611) && !defined(USE_BARO_BMP280) && !defined(USE_BARO_SPI_BMP280)
UNUSED(dev);
#endif
#ifdef USE_BARO_BMP085
const bmp085Config_t *bmp085Config = NULL;

View File

@ -115,17 +115,12 @@
#define FLASH_SIZE 2048
# define DEFIO_PORT_USED_COUNT 0
# define DEFIO_PORT_USED_LIST /* empty */
# define DEFIO_PORT_OFFSET_LIST /* empty */
#define LED_STRIP_TIMER 1
#define SOFTSERIAL_1_TIMER 2
#define SOFTSERIAL_2_TIMER 3
#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTA 0x0001 // define one pin to avoid warnings
#define WS2811_DMA_TC_FLAG (void *)1
#define WS2811_DMA_HANDLER_IDENTIFER 0
@ -162,7 +157,7 @@ typedef struct
uint32_t BRR;
} GPIO_TypeDef;
#define GPIOA_BASE (0x0001)
#define GPIOA_BASE ((intptr_t)0x0001)
typedef struct
{