aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2016-04-18 13:30:55 -0500
committerChih-Hung Hsieh2016-04-18 14:29:30 -0500
commit54a2747ef305c10d07d8db393125dbcbb461c428 (patch)
treead6f90bea569c5f01bbf9485e356dcdb035d79c5 /wear_ui.cpp
parent51dcd0da37dd10238017bae03fc708dc6e05bb56 (diff)
downloadplatform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.gz
platform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.tar.xz
platform-bootable-recovery-54a2747ef305c10d07d8db393125dbcbb461c428.zip
Fix google-runtime-int warnings.
Bug: 28220065 Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
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();