Merge "Fix google-runtime-int warnings." am: a1f4a1e

am: bcad1d1

* commit 'bcad1d1ced730478c94f951034d252e777661332':
  Fix google-runtime-int warnings.

Change-Id: Ifad31026502e3375f4833899056662da540319b5
This commit is contained in:
Chih-hung Hsieh
2016-04-18 22:34:41 +00:00
committed by android-build-merger
12 changed files with 53 additions and 46 deletions
+5 -5
View File
@@ -379,7 +379,7 @@ void ScreenRecoveryUI::ProgressThreadLoop() {
// 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));
}
}
@@ -613,8 +613,8 @@ void ScreenRecoveryUI::ClearText() {
}
void ScreenRecoveryUI::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;
@@ -624,7 +624,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
while (true) {
if (show_prompt) {
PrintOnScreenOnly("--(%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) {
@@ -643,7 +643,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
if (feof(fp)) {
return;
}
offsets.push_back(ftell(fp));
offsets.push_back(ftello(fp));
}
}
ClearText();