drivers: fix -Wstringop-truncation
GCC 9 complained about stringop-truncation which is a cautionary message to prevent using strncpy with non-null terminated strings. We can fix this by copying one byte less than the destination size and then manually adding the null termination, as we already do.
Showing
- src/drivers/distance_sensor/cm8jl65/cm8jl65.cpp 1 addition, 1 deletionsrc/drivers/distance_sensor/cm8jl65/cm8jl65.cpp
- src/drivers/distance_sensor/pga460/pga460.cpp 1 addition, 1 deletionsrc/drivers/distance_sensor/pga460/pga460.cpp
- src/drivers/distance_sensor/sf0x/sf0x.cpp 1 addition, 1 deletionsrc/drivers/distance_sensor/sf0x/sf0x.cpp
- src/drivers/distance_sensor/tfmini/tfmini.cpp 1 addition, 1 deletionsrc/drivers/distance_sensor/tfmini/tfmini.cpp
- src/drivers/distance_sensor/ulanding/ulanding.cpp 1 addition, 1 deletionsrc/drivers/distance_sensor/ulanding/ulanding.cpp
- src/drivers/gps/gps.cpp 1 addition, 1 deletionsrc/drivers/gps/gps.cpp
Loading
Please register or sign in to comment