mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-07 08:28:30 -04:00
APM_Control: Supress some compilier warnings about strncpy
This commit is contained in:
parent
b2d8f6e788
commit
84b1a6a58b
@ -273,10 +273,10 @@ void AP_AutoTune::log_param_change(float v, const char *suffix)
|
|||||||
}
|
}
|
||||||
char key[AP_MAX_NAME_SIZE+1];
|
char key[AP_MAX_NAME_SIZE+1];
|
||||||
if (type == AUTOTUNE_ROLL) {
|
if (type == AUTOTUNE_ROLL) {
|
||||||
strncpy(key, "RLL2SRV_", 8);
|
strncpy(key, "RLL2SRV_", 9);
|
||||||
strncpy(&key[8], suffix, AP_MAX_NAME_SIZE-8);
|
strncpy(&key[8], suffix, AP_MAX_NAME_SIZE-8);
|
||||||
} else {
|
} else {
|
||||||
strncpy(key, "PTCH2SRV_", 9);
|
strncpy(key, "PTCH2SRV_", 10);
|
||||||
strncpy(&key[9], suffix, AP_MAX_NAME_SIZE-9);
|
strncpy(&key[9], suffix, AP_MAX_NAME_SIZE-9);
|
||||||
}
|
}
|
||||||
key[AP_MAX_NAME_SIZE] = 0;
|
key[AP_MAX_NAME_SIZE] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user