Use correct variable types for printf format

This commit is contained in:
Moritz Bunkus 2010-06-03 14:12:23 +02:00
parent 7a1188cc53
commit c524f2f9dc
2 changed files with 3 additions and 3 deletions

View File

@ -288,7 +288,7 @@ job_run_dialog::update_remaining_time() {
int64_t remaining_time = total_time - now + m_start_time;
m_next_remaining_time_update = now + 1000;
st_remaining_time->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), remaining_time / 60000, (remaining_time / 1000) % 60));
st_remaining_time->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), static_cast<int>(remaining_time / 60000), static_cast<int>((remaining_time / 1000) % 60)));
}
if (now >= m_next_remaining_time_update_total) {
@ -296,7 +296,7 @@ job_run_dialog::update_remaining_time() {
int64_t remaining_time = total_time - now + m_start_time_total;
m_next_remaining_time_update_total = now + 1000;
st_remaining_time_total->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), remaining_time / 60000, (remaining_time / 1000) % 60));
st_remaining_time_total->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), static_cast<int>(remaining_time / 60000), static_cast<int>((remaining_time / 1000) % 60)));
}
}

View File

@ -245,7 +245,7 @@ mux_dialog::update_remaining_time() {
int64_t total_time = (now - m_start_time) * 100 / m_progress;
int64_t remaining_time = total_time - now + m_start_time;
st_remaining_time->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), remaining_time / 60000, (remaining_time / 1000) % 60));
st_remaining_time->SetLabel(wxString::Format(Z("%d minute(s) %d second(s)"), static_cast<int>(remaining_time / 60000), static_cast<int>((remaining_time / 1000) % 60)));
m_next_remaining_time_update = now + 1000;
}