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:
@@ -29,7 +29,7 @@ std::vector<uint8_t> readWholeFile(const std::string& filePath) {
|
|||||||
LOG_ALWAYS_FATAL_IF(fstat(fileno(fp), &st) != 0);
|
LOG_ALWAYS_FATAL_IF(fstat(fileno(fp), &st) != 0);
|
||||||
|
|
||||||
std::vector<uint8_t> result(st.st_size);
|
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);
|
fclose(fp);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user