mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-06 13:44:21 -04:00
GCS_MAVLink: add printf-format attribute to send_text methods
This commit is contained in:
parent
678c11f048
commit
5e55aedd20
@ -51,7 +51,7 @@ public:
|
||||
void init(AP_HAL::UARTDriver *port, mavlink_channel_t mav_chan);
|
||||
void setup_uart(uint8_t instance);
|
||||
void send_message(enum ap_message id);
|
||||
void send_text(MAV_SEVERITY severity, const char *fmt, ...) const;
|
||||
void send_text(MAV_SEVERITY severity, const char *fmt, ...) const FMT_PRINTF(3, 4);
|
||||
void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list) const;
|
||||
void queued_param_send();
|
||||
void queued_mission_request_send();
|
||||
@ -696,7 +696,7 @@ public:
|
||||
|
||||
void send_to_active_channels(uint32_t msgid, const char *pkt);
|
||||
|
||||
void send_text(MAV_SEVERITY severity, const char *fmt, ...);
|
||||
void send_text(MAV_SEVERITY severity, const char *fmt, ...) FMT_PRINTF(3, 4);
|
||||
void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list);
|
||||
virtual void send_statustext(MAV_SEVERITY severity, uint8_t dest_bitmask, const char *text);
|
||||
void service_statustext(void);
|
||||
|
@ -3141,7 +3141,7 @@ void GCS_MAVLINK::send_banner()
|
||||
// mark the firmware version in the tlog
|
||||
const AP_FWVersion &fwver = AP::fwversion();
|
||||
|
||||
send_text(MAV_SEVERITY_INFO, fwver.fw_string);
|
||||
send_text(MAV_SEVERITY_INFO, "%s", fwver.fw_string);
|
||||
|
||||
if (fwver.middleware_name && fwver.os_name) {
|
||||
send_text(MAV_SEVERITY_INFO, "%s: %s %s: %s",
|
||||
@ -3155,7 +3155,7 @@ void GCS_MAVLINK::send_banner()
|
||||
// send system ID if we can
|
||||
char sysid[40];
|
||||
if (hal.util->get_system_id(sysid)) {
|
||||
send_text(MAV_SEVERITY_INFO, sysid);
|
||||
send_text(MAV_SEVERITY_INFO, "%s", sysid);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user