Summary:
Accidentally spotted this problem. `folly/FileUtil.h` and
`common/files/FileUtil.h` are now using `*NoInt` wrappers where appropriate.
Test Plan: fbconfig -r common/files folly && fbmake opt -j32
Reviewed By: lucian@fb.com
Subscribers: folly@lists, fbcode-common-diffs@lists
FB internal diff:
D1356261
"readFile: only containers with byte-sized elements accepted");
assert(file_name);
- const auto fd = open(file_name, O_RDONLY);
+ const auto fd = openNoInt(file_name, O_RDONLY);
if (fd == -1) return false;
size_t soFar = 0; // amount of bytes successfully read
assert(out.size() >= soFar); // resize better doesn't throw
out.resize(soFar);
// Ignore errors when closing the file
- close(fd);
+ closeNoInt(fd);
};
// Obtain file size: