forked from Archive/PX4-Autopilot
spi: put brackets such that GCC12 considers it a pointer for sure
otherwise you get the warning/error px4_spi_buses can never be NULL
This commit is contained in:
parent
0c97b0f4b0
commit
adb22f1407
|
@ -71,7 +71,7 @@ const px4_spi_bus_t *px4_spi_buses{nullptr};
|
|||
|
||||
int px4_find_spi_bus(uint32_t devid)
|
||||
{
|
||||
for (int i = 0; (px4_spi_bus_t *) px4_spi_buses != nullptr && i < SPI_BUS_MAX_BUS_ITEMS; ++i) {
|
||||
for (int i = 0; ((px4_spi_bus_t *) px4_spi_buses) != nullptr && i < SPI_BUS_MAX_BUS_ITEMS; ++i) {
|
||||
const px4_spi_bus_t &bus_data = px4_spi_buses[i];
|
||||
|
||||
if (bus_data.bus == -1) {
|
||||
|
|
Loading…
Reference in New Issue