PX4-Autopilot
PX4-Autopilot copied to clipboard
spi.cpp remove null check
Using GCC 13.2.1, spi.cpp doesn't compile due to an error with the px4_spi_buses null check. Removing the null check fixes the error.
error: the address of 'px4_spi_buses' will never be NULL [-Werror=address] 90 | for (int i = 0; ((px4_spi_bus_t *) px4_spi_buses) != nullptr && i < SPI_BUS_MAX_BUS_ITEMS; ++i) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ compilation terminated due to -Wfatal-errors.
I'm wondering if this was ever relevant somewhere.