Fix build failure of minikin_perftest

stat.st_size is off_t not size_t, so need to cast to size_t before
compare it.

Change-Id: I6b742746fbb9f254701fc91e515c293f93f912c5
This commit is contained in:
Seigo Nonaka
2016-06-28 18:35:48 +09:00
parent a89c08ae49
commit cd8eea6205

View File

@@ -29,7 +29,7 @@ std::vector<uint8_t> readWholeFile(const std::string& filePath) {
LOG_ALWAYS_FATAL_IF(fstat(fileno(fp), &st) != 0);
std::vector<uint8_t> result(st.st_size);
LOG_ALWAYS_FATAL_IF(fread(result.data(), 1, st.st_size, fp) != st.st_size);
LOG_ALWAYS_FATAL_IF(fread(result.data(), 1, st.st_size, fp) != static_cast<size_t>(st.st_size));
fclose(fp);
return result;
}