AP_CANManager: fixed printf format errors

This commit is contained in:
Andrew Tridgell 2021-08-04 12:44:30 +10:00
parent 45f6b16dec
commit 7cdd18924e
3 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ public:
}
// Method to log status and debug information for review while debugging
void log_text(AP_CANManager::LogLevel loglevel, const char *tag, const char *fmt, ...);
void log_text(AP_CANManager::LogLevel loglevel, const char *tag, const char *fmt, ...) FMT_PRINTF(4,5);
void log_retrieve(ExpandingString &str) const;

View File

@ -53,7 +53,7 @@ const AP_Param::GroupInfo CANTester::var_info[] = {
};
#define debug_can(level_debug, fmt, args...) do { AP::can().log_text(level_debug, "CANTester", fmt, #args); } while (0)
#define debug_can(level_debug, fmt, args...) do { AP::can().log_text(level_debug, "CANTester", fmt, ##args); } while (0)
bool CANTester::add_interface(AP_HAL::CANIface* can_iface)
{

View File

@ -26,7 +26,7 @@
#include <AP_HAL/utility/sparse-endian.h>
#include <AP_Vehicle/AP_Vehicle.h>
#define debug_can(level_debug, fmt, args...) do { AP::can().log_text(level_debug, "TestKDECAN", fmt, #args); } while (0)
#define debug_can(level_debug, fmt, args...) do { AP::can().log_text(level_debug, "TestKDECAN", fmt, ##args); } while (0)
extern const AP_HAL::HAL& hal;
void AP_CANTester_KDECAN::count_msg(uint32_t frame_id)