PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

spi.cpp remove null check

Open AlexKlimaj opened this issue 1 year ago • 1 comments

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.

AlexKlimaj avatar Feb 19 '24 06:02 AlexKlimaj

I'm wondering if this was ever relevant somewhere.

dagar avatar Feb 20 '24 16:02 dagar