-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix compile warnings #960
fix compile warnings #960
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
…s; unused sPower; NEEDS TESTING
2aae11c
to
edd3d8b
Compare
This entire PR needs real-world testing. please see original description, which may change.
this is the last remaining warning for F7, but it is 3rd party library/driver. ./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c: In function 'HAL_UART_Init':
./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c:251:5: warning: this condition has identical branches [-Wduplicated-branches]
251 | if(huart->Init.HwFlowCtl != UART_HWCONTROL_NONE)
| ^ These warnings for HelioSring still exist: ./src/main/drivers/accgyro/accgyro_imuf9001.c: In function 'imuf9001SendReceiveCommand':
./src/main/drivers/accgyro/accgyro_imuf9001.c:215:5: warning: converting a packed 'imufCommand_t' {aka 'struct imufCommand'} pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
215 | command.crc = getCrcImuf9001((uint32_t *)&command, 11);;
| ^~~~~~~
In file included from ./src/main/drivers/accgyro/accgyro_imuf9001.c:29:
./src/main/drivers/accgyro/accgyro_imuf9001.h:45:16: note: defined here
45 | typedef struct imufCommand {
| ^~~~~~~~~~~
./src/main/drivers/accgyro/accgyro_imuf9001.c:221:17: warning: converting a packed 'imufCommand_t' {aka 'struct imufCommand'} pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
221 | crcCalc = getCrcImuf9001((uint32_t *)reply, 11);
| ^~~~~~~
In file included from ./src/main/drivers/accgyro/accgyro_imuf9001.c:29:
./src/main/drivers/accgyro/accgyro_imuf9001.h:45:16: note: defined here
45 | typedef struct imufCommand {
| ^~~~~~~~~~~
./src/main/drivers/accgyro/accgyro_imuf9001.c:227:25: warning: converting a packed 'imufCommand_t' {aka 'struct imufCommand'} pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
227 | command.crc = getCrcImuf9001((uint32_t *)&command, 11);
| ^~~~~~~
In file included from ./src/main/drivers/accgyro/accgyro_imuf9001.c:29:
./src/main/drivers/accgyro/accgyro_imuf9001.h:45:16: note: defined here
45 | typedef struct imufCommand {
| ^~~~~~~~~~~
./src/main/drivers/accgyro/accgyro_imuf9001.c:240:29: warning: converting a packed 'imufCommand_t' {aka 'struct imufCommand'} pointer (alignment 1) to a 'uint32_t' {aka 'long unsigned int'} pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
240 | crcCalc = getCrcImuf9001((uint32_t *)reply, 11);
| ^~~~~~~
In file included from ./src/main/drivers/accgyro/accgyro_imuf9001.c:29:
./src/main/drivers/accgyro/accgyro_imuf9001.h:45:16: note: defined here
45 | typedef struct imufCommand {
| ^~~~~~~~~~~
./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c: In function 'HAL_UART_Init':
./lib/main/STM32F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c:251:5: warning: this condition has identical branches [-Wduplicated-branches]
251 | if(huart->Init.HwFlowCtl != UART_HWCONTROL_NONE)
| ^ |
|
bd76047
to
61fcf99
Compare
…based on board.h, but memcpy and removal of +1 from .h could work as well
61fcf99
to
46520d7
Compare
i feel i should close this and perform "Atomic" commits/fixes. |
re-openeing only to push a commit ( |
DRAFT - WIP
ref: betaflight/betaflight#9228
42c113c5e
(smartaudio FREQ mode OSD menu) & commitedd3d8b71
(beesign & spektrum functions)