Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UAVOMSPBridge: Use memcpy instead of strncpy where src len > dest (#2209
) GCC8 doesn't like it otherwise: /home/mike/dev/dronin/flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c: In function ‘msp_send_fc_variant’: /home/mike/dev/dronin/flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c:388:2: error: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation] strncpy(data.var.name, "DRON", 4); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/mike/dev/dronin/flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c: In function ‘msp_send_board_info’: /home/mike/dev/dronin/flight/Modules/UAVOMSPBridge/UAVOMSPBridge.c:405:2: error: ‘strncpy’ output truncated copying 4 bytes from a string of length 7 [-Werror=stringop-truncation] strncpy(data.board.name, DRONIN_TARGET, 4); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
- Loading branch information