summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2016-04-19 00:39:41 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-19 00:39:41 +0200
commit7140a083c7d37a86ae95bb671fd5dd932b272e6b (patch)
tree3fca7568ae457f415fe41088a497f7de328afd54 /wear_ui.cpp
parentMerge "Fix IWYU errors." am: 51dcd0d am: 405db92 (diff)
parentMerge "Fix google-runtime-int warnings." am: a1f4a1e am: bcad1d1 (diff)
downloadandroid_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.gz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.bz2
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.lz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.xz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.zst
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.zip
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index 2502313ff..5451ed1aa 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -277,7 +277,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));
}
}
@@ -500,8 +500,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;
@@ -511,7 +511,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) {
@@ -530,7 +530,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) {
if (feof(fp)) {
return;
}
- offsets.push_back(ftell(fp));
+ offsets.push_back(ftello(fp));
}
}
ClearText();