From 54a2747ef305c10d07d8db393125dbcbb461c428 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Mon, 18 Apr 2016 11:30:55 -0700 Subject: Fix google-runtime-int warnings. Bug: 28220065 Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592 --- screen_ui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'screen_ui.cpp') diff --git a/screen_ui.cpp b/screen_ui.cpp index 522aa6b23..1d33269d2 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -356,7 +356,7 @@ void ScreenRecoveryUI::ProgressThreadLoop() { // minimum of 20ms delay between frames double delay = interval - (end-start); if (delay < 0.02) delay = 0.02; - usleep((long)(delay * 1000000)); + usleep(static_cast(delay * 1000000)); } } @@ -572,8 +572,8 @@ void ScreenRecoveryUI::ClearText() { } void ScreenRecoveryUI::ShowFile(FILE* fp) { - std::vector offsets; - offsets.push_back(ftell(fp)); + std::vector offsets; + offsets.push_back(ftello(fp)); ClearText(); struct stat sb; @@ -583,7 +583,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { while (true) { if (show_prompt) { PrintOnScreenOnly("--(%d%% of %d bytes)--", - static_cast(100 * (double(ftell(fp)) / double(sb.st_size))), + static_cast(100 * (double(ftello(fp)) / double(sb.st_size))), static_cast(sb.st_size)); Redraw(); while (show_prompt) { @@ -602,7 +602,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { if (feof(fp)) { return; } - offsets.push_back(ftell(fp)); + offsets.push_back(ftello(fp)); } } ClearText(); -- cgit v1.2.3