1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Fixed warnings in STM libraries about ignored attributes.

This commit is contained in:
mikeller 2019-11-26 07:27:59 +13:00
parent 23c458e85f
commit 74f2f61452
2 changed files with 4 additions and 4 deletions

View file

@ -955,7 +955,7 @@ HAL_StatusTypeDef USB_WritePacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *src, uin
count32b = ((uint32_t)len + 3U) / 4U; count32b = ((uint32_t)len + 3U) / 4U;
for (i = 0U; i < count32b; i++) for (i = 0U; i < count32b; i++)
{ {
USBx_DFIFO((uint32_t)ch_ep_num) = *((__packed uint32_t *)pSrc); USBx_DFIFO((uint32_t)ch_ep_num) = *((uint32_t *)pSrc);
pSrc++; pSrc++;
} }
} }
@ -984,7 +984,7 @@ void *USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len)
for (i = 0U; i < count32b; i++) for (i = 0U; i < count32b; i++)
{ {
*(__packed uint32_t *)pDest = USBx_DFIFO(0U); *(uint32_t *)pDest = USBx_DFIFO(0U);
pDest++; pDest++;
} }

View file

@ -180,7 +180,7 @@ USB_OTG_STS USB_OTG_WritePacket(USB_OTG_CORE_HANDLE *pdev,
fifo = pdev->regs.DFIFO[ch_ep_num]; fifo = pdev->regs.DFIFO[ch_ep_num];
for (i = 0; i < count32b; i++) for (i = 0; i < count32b; i++)
{ {
USB_OTG_WRITE_REG32( fifo, *((__packed uint32_t *)src) ); USB_OTG_WRITE_REG32( fifo, *((uint32_t *)src) );
src+=4; src+=4;
} }
} }
@ -206,7 +206,7 @@ void *USB_OTG_ReadPacket(USB_OTG_CORE_HANDLE *pdev,
for( i = 0; i < count32b; i++) for( i = 0; i < count32b; i++)
{ {
*(__packed uint32_t *)dest = USB_OTG_READ_REG32(fifo); *(uint32_t *)dest = USB_OTG_READ_REG32(fifo);
dest += 4 ; dest += 4 ;
} }
return ((void *)dest); return ((void *)dest);