From c5333c2765f6e2039f14493f7670c7a359cc498a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 21 Aug 2019 19:46:44 +1000 Subject: [PATCH] Sub: fix format-string compilation warning ../../ArduSub/commands_logic.cpp: In member function 'void Sub::do_nav_delay(const AP_Mission::Mission_Command&)': ../../ArduSub/commands_logic.cpp:485:84: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=] gcs().send_text(MAV_SEVERITY_INFO, "Delaying %u sec",nav_delay_time_max_ms/1000); ^ --- ArduSub/commands_logic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduSub/commands_logic.cpp b/ArduSub/commands_logic.cpp index 6e7dcddcc3..69c2df6762 100644 --- a/ArduSub/commands_logic.cpp +++ b/ArduSub/commands_logic.cpp @@ -482,7 +482,7 @@ void Sub::do_nav_delay(const AP_Mission::Mission_Command& cmd) // absolute delay to utc time nav_delay_time_max_ms = AP::rtc().get_time_utc(cmd.content.nav_delay.hour_utc, cmd.content.nav_delay.min_utc, cmd.content.nav_delay.sec_utc, 0); } - gcs().send_text(MAV_SEVERITY_INFO, "Delaying %u sec",nav_delay_time_max_ms/1000); + gcs().send_text(MAV_SEVERITY_INFO, "Delaying %u sec", (unsigned)(nav_delay_time_max_ms/1000)); } #if NAV_GUIDED == ENABLED