diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-04-18 20:30:55 +0200 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2016-04-18 21:29:30 +0200 |
commit | 54a2747ef305c10d07d8db393125dbcbb461c428 (patch) | |
tree | ad6f90bea569c5f01bbf9485e356dcdb035d79c5 /wear_ui.cpp | |
parent | Merge "Fix IWYU errors." (diff) | |
download | android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.gz android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.bz2 android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.lz android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.xz android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.zst android_bootable_recovery-54a2747ef305c10d07d8db393125dbcbb461c428.zip |
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r-- | wear_ui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp index 50aeb3849..48278ff21 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -320,7 +320,7 @@ void WearRecoveryUI::progress_loop() { // 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<useconds_t>(delay * 1000000)); } } @@ -573,8 +573,8 @@ void WearRecoveryUI::Redraw() } void WearRecoveryUI::ShowFile(FILE* fp) { - std::vector<long> offsets; - offsets.push_back(ftell(fp)); + std::vector<off_t> offsets; + offsets.push_back(ftello(fp)); ClearText(); struct stat sb; @@ -584,7 +584,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) { while (true) { if (show_prompt) { Print("--(%d%% of %d bytes)--", - static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), + static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))), static_cast<int>(sb.st_size)); Redraw(); while (show_prompt) { @@ -603,7 +603,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) { if (feof(fp)) { return; } - offsets.push_back(ftell(fp)); + offsets.push_back(ftello(fp)); } } ClearText(); |