diff options
author | Chih-hung Hsieh | 2016-04-18 17:34:41 -0500 |
---|---|---|
committer | android-build-merger | 2016-04-18 17:34:41 -0500 |
commit | 0231e7016dfe56625d6d01a1de468cd23d9cf01a (patch) | |
tree | 543fc407741ac3df540e3bfe4c36688e3bda6d80 /screen_ui.cpp | |
parent | d911d81450570f5b9df46dce44898f47ea3b11de (diff) | |
parent | bcad1d1ced730478c94f951034d252e777661332 (diff) | |
download | platform-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 'screen_ui.cpp')
-rw-r--r-- | screen_ui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp index b32df364..cfe36e18 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp | |||
@@ -379,7 +379,7 @@ void ScreenRecoveryUI::ProgressThreadLoop() { | |||
379 | // minimum of 20ms delay between frames | 379 | // minimum of 20ms delay between frames |
380 | double delay = interval - (end-start); | 380 | double delay = interval - (end-start); |
381 | if (delay < 0.02) delay = 0.02; | 381 | if (delay < 0.02) delay = 0.02; |
382 | usleep((long)(delay * 1000000)); | 382 | usleep(static_cast<useconds_t>(delay * 1000000)); |
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
@@ -613,8 +613,8 @@ void ScreenRecoveryUI::ClearText() { | |||
613 | } | 613 | } |
614 | 614 | ||
615 | void ScreenRecoveryUI::ShowFile(FILE* fp) { | 615 | void ScreenRecoveryUI::ShowFile(FILE* fp) { |
616 | std::vector<long> offsets; | 616 | std::vector<off_t> offsets; |
617 | offsets.push_back(ftell(fp)); | 617 | offsets.push_back(ftello(fp)); |
618 | ClearText(); | 618 | ClearText(); |
619 | 619 | ||
620 | struct stat sb; | 620 | struct stat sb; |
@@ -624,7 +624,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { | |||
624 | while (true) { | 624 | while (true) { |
625 | if (show_prompt) { | 625 | if (show_prompt) { |
626 | PrintOnScreenOnly("--(%d%% of %d bytes)--", | 626 | PrintOnScreenOnly("--(%d%% of %d bytes)--", |
627 | static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), | 627 | static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))), |
628 | static_cast<int>(sb.st_size)); | 628 | static_cast<int>(sb.st_size)); |
629 | Redraw(); | 629 | Redraw(); |
630 | while (show_prompt) { | 630 | while (show_prompt) { |
@@ -643,7 +643,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { | |||
643 | if (feof(fp)) { | 643 | if (feof(fp)) { |
644 | return; | 644 | return; |
645 | } | 645 | } |
646 | offsets.push_back(ftell(fp)); | 646 | offsets.push_back(ftello(fp)); |
647 | } | 647 | } |
648 | } | 648 | } |
649 | ClearText(); | 649 | ClearText(); |