summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2016-04-19 00:37:16 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-19 00:37:16 +0200
commited4c0c4ca04943a79d2dc7ac2c095ed6ca20f749 (patch)
tree543fc407741ac3df540e3bfe4c36688e3bda6d80 /screen_ui.cpp
parentMerge "Fix IWYU errors." am: 51dcd0d (diff)
parentMerge "Fix google-runtime-int warnings." am: a1f4a1e (diff)
downloadandroid_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar.gz
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar.bz2
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar.lz
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar.xz
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.tar.zst
android_bootable_recovery-ed4c0c4ca04943a79d2dc7ac2c095ed6ca20f749.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index b32df3649..cfe36e186 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -379,7 +379,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<useconds_t>(delay * 1000000));
}
}
@@ -613,8 +613,8 @@ void ScreenRecoveryUI::ClearText() {
}
void ScreenRecoveryUI::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;
@@ -624,7 +624,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
while (true) {
if (show_prompt) {
PrintOnScreenOnly("--(%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) {
@@ -643,7 +643,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
if (feof(fp)) {
return;
}
- offsets.push_back(ftell(fp));
+ offsets.push_back(ftello(fp));
}
}
ClearText();