1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Merge pull request #7843 from stawiski/warnings-fix

Fixed warnings.
This commit is contained in:
Michael Keller 2019-04-14 21:45:37 +12:00 committed by GitHub
commit ef94b5f077
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -220,9 +220,9 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
#define DMAINIT dmaInitStruct
#endif
dmaStream_t *dmaRef;
dmaStream_t *dmaRef = NULL;
#if defined(STM32F4)
uint32_t dmaChannel;
uint32_t dmaChannel = 0;
#endif
#if defined(USE_DMA_SPEC)
const dmaChannelSpec_t *dmaSpec = dmaGetChannelSpecByTimer(timerHardware);

View file

@ -204,8 +204,8 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
#define DMAINIT dmaInitStruct
#endif
DMA_Stream_TypeDef *dmaRef;
uint32_t dmaChannel;
DMA_Stream_TypeDef *dmaRef = NULL;
uint32_t dmaChannel = 0;
#if defined(USE_DMA_SPEC)
const dmaChannelSpec_t *dmaSpec = dmaGetChannelSpecByTimer(timerHardware);
@ -290,7 +290,7 @@ void pwmDshotMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t m
motor->icInitStruct.ICFilter = 0; //2;
#endif
uint32_t channel;
uint32_t channel = 0;
switch (timerHardware->channel) {
case TIM_CHANNEL_1: channel = LL_TIM_CHANNEL_CH1; break;
case TIM_CHANNEL_2: channel = LL_TIM_CHANNEL_CH2; break;

View file

@ -296,9 +296,9 @@ static void emfat_add_log(emfat_entry_t *entry, int number, uint32_t offset, uin
static int emfat_find_log(emfat_entry_t *entry, int maxCount)
{
uint32_t limit = flashfsIdentifyStartOfFreeSpace();
uint32_t lastOffset = 0;
uint32_t currOffset = 0;
int limit = flashfsIdentifyStartOfFreeSpace();
int lastOffset = 0;
int currOffset = 0;
int fileNumber = 0;
uint8_t buffer[18];
int logCount = 0;