Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpio: sx1509b: Fix address-of-packed-mem warning
The warning below appears once -Waddress-of-packed-mem is enabled: /__w/zephyr/zephyr/drivers/gpio/gpio_sx1509b.c: In function 'port_write': /__w/zephyr/zephyr/drivers/gpio/gpio_sx1509b.c:456:19: error: taking address of packed member of 'struct sx1509b_pin_state' may result in an unaligned pointer value [-Werror=address-of-packed-member] 456 | uint16_t *outp = &drv_data->pin_state.data; To avoid the warning, use an intermediate void * variable. More info in zephyrproject-rtos#16587. Signed-off-by: Carles Cufi <[email protected]>
- Loading branch information