aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-hung Hsieh2016-04-18 17:34:41 -0500
committerandroid-build-merger2016-04-18 17:34:41 -0500
commit0231e7016dfe56625d6d01a1de468cd23d9cf01a (patch)
tree543fc407741ac3df540e3bfe4c36688e3bda6d80 /wear_ui.cpp
parentd911d81450570f5b9df46dce44898f47ea3b11de (diff)
parentbcad1d1ced730478c94f951034d252e777661332 (diff)
downloadplatform-bootable-recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.gz
platform-bootable-recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.tar.xz
platform-bootable-recovery-0231e7016dfe56625d6d01a1de468cd23d9cf01a.zip
Merge "Fix google-runtime-int warnings." am: a1f4a1e
am: bcad1d1 * commit 'bcad1d1ced730478c94f951034d252e777661332': Fix google-runtime-int warnings. Change-Id: Ifad31026502e3375f4833899056662da540319b5
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 2502313f..5451ed1a 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -277,7 +277,7 @@ void WearRecoveryUI::progress_loop() {
277 // minimum of 20ms delay between frames 277 // minimum of 20ms delay between frames
278 double delay = interval - (end-start); 278 double delay = interval - (end-start);
279 if (delay < 0.02) delay = 0.02; 279 if (delay < 0.02) delay = 0.02;
280 usleep((long)(delay * 1000000)); 280 usleep(static_cast<useconds_t>(delay * 1000000));
281 } 281 }
282} 282}
283 283
@@ -500,8 +500,8 @@ void WearRecoveryUI::Redraw()
500} 500}
501 501
502void WearRecoveryUI::ShowFile(FILE* fp) { 502void WearRecoveryUI::ShowFile(FILE* fp) {
503 std::vector<long> offsets; 503 std::vector<off_t> offsets;
504 offsets.push_back(ftell(fp)); 504 offsets.push_back(ftello(fp));
505 ClearText(); 505 ClearText();
506 506
507 struct stat sb; 507 struct stat sb;
@@ -511,7 +511,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) {
511 while (true) { 511 while (true) {
512 if (show_prompt) { 512 if (show_prompt) {
513 Print("--(%d%% of %d bytes)--", 513 Print("--(%d%% of %d bytes)--",
514 static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), 514 static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))),
515 static_cast<int>(sb.st_size)); 515 static_cast<int>(sb.st_size));
516 Redraw(); 516 Redraw();
517 while (show_prompt) { 517 while (show_prompt) {
@@ -530,7 +530,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) {
530 if (feof(fp)) { 530 if (feof(fp)) {
531 return; 531 return;
532 } 532 }
533 offsets.push_back(ftell(fp)); 533 offsets.push_back(ftello(fp));
534 } 534 }
535 } 535 }
536 ClearText(); 536 ClearText();