aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2016-04-18 17:29:19 -0500
committerandroid-build-merger2016-04-18 17:29:19 -0500
commitbcad1d1ced730478c94f951034d252e777661332 (patch)
treead6f90bea569c5f01bbf9485e356dcdb035d79c5 /wear_ui.cpp
parent405db92b6e6384f0f22ba6be338c08e8f1aad345 (diff)
parenta1f4a1ec3319ee1ab869a46805bff63550b56ca7 (diff)
downloadplatform-bootable-recovery-bcad1d1ced730478c94f951034d252e777661332.tar.gz
platform-bootable-recovery-bcad1d1ced730478c94f951034d252e777661332.tar.xz
platform-bootable-recovery-bcad1d1ced730478c94f951034d252e777661332.zip
Merge "Fix google-runtime-int warnings."
am: a1f4a1e * commit 'a1f4a1ec3319ee1ab869a46805bff63550b56ca7': Fix google-runtime-int warnings. Change-Id: If924b2e1b1e7e7bb4317fdca0c583b7de45db397
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 50aeb384..48278ff2 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -320,7 +320,7 @@ void WearRecoveryUI::progress_loop() {
320 // minimum of 20ms delay between frames 320 // minimum of 20ms delay between frames
321 double delay = interval - (end-start); 321 double delay = interval - (end-start);
322 if (delay < 0.02) delay = 0.02; 322 if (delay < 0.02) delay = 0.02;
323 usleep((long)(delay * 1000000)); 323 usleep(static_cast<useconds_t>(delay * 1000000));
324 } 324 }
325} 325}
326 326
@@ -573,8 +573,8 @@ void WearRecoveryUI::Redraw()
573} 573}
574 574
575void WearRecoveryUI::ShowFile(FILE* fp) { 575void WearRecoveryUI::ShowFile(FILE* fp) {
576 std::vector<long> offsets; 576 std::vector<off_t> offsets;
577 offsets.push_back(ftell(fp)); 577 offsets.push_back(ftello(fp));
578 ClearText(); 578 ClearText();
579 579
580 struct stat sb; 580 struct stat sb;
@@ -584,7 +584,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) {
584 while (true) { 584 while (true) {
585 if (show_prompt) { 585 if (show_prompt) {
586 Print("--(%d%% of %d bytes)--", 586 Print("--(%d%% of %d bytes)--",
587 static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), 587 static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))),
588 static_cast<int>(sb.st_size)); 588 static_cast<int>(sb.st_size));
589 Redraw(); 589 Redraw();
590 while (show_prompt) { 590 while (show_prompt) {
@@ -603,7 +603,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) {
603 if (feof(fp)) { 603 if (feof(fp)) {
604 return; 604 return;
605 } 605 }
606 offsets.push_back(ftell(fp)); 606 offsets.push_back(ftello(fp));
607 } 607 }
608 } 608 }
609 ClearText(); 609 ClearText();