diff options
author | Kenneth Heafield <github@kheafield.com> | 2014-01-28 04:51:35 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2014-01-28 04:51:35 +0400 |
commit | 14e02978fcbbe9ec6ed3faa232fcb3f30664f40e (patch) | |
tree | 0b0d19a9c1ba1020ae6b3f1230b8b5b9e6a945f9 /util/usage.cc | |
parent | b68a906fdd97c344ce7d6fa90a2db5a79c5853e6 (diff) |
KenLM 5cc905bc2d214efa7de2db56a9a672b749a95591
Avoid unspecified behavior of mmap when a file is resized reported by Christian Hardmeier
Fixes for Mavericks and a workaround for Boost's broken semaphore
Clean clang compile (of kenlm)
Merged some of 744376b3fbebc41c4a270bf549826d5eb9219ae0 but also undid some of it because it was just masking a fundaemntal problem with pread rather than working around windows limitations
Diffstat (limited to 'util/usage.cc')
-rw-r--r-- | util/usage.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/usage.cc b/util/usage.cc index 2f870d854..e68d7c7c1 100644 --- a/util/usage.cc +++ b/util/usage.cc @@ -66,6 +66,11 @@ Wall GetWall() { } #endif +// Some of these functions are only used on some platforms. +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif // These all assume first > second double Subtract(time_t first, time_t second) { return difftime(first, second); @@ -87,6 +92,9 @@ double DoubleSec(const struct timespec &tv) { return static_cast<double>(tv.tv_sec) + (static_cast<double>(tv.tv_nsec) / 1000000000.0); } #endif +#ifdef __clang__ +#pragma clang diagnostic pop +#endif class RecordStart { public: |