Fix copyright lines
[folly.git] / folly / io / RecordIO.cpp
index 8cb081c825cdac384af2e3e2d0e7606e3deacc8c..29e2b53d61aa5458a3ca7f22e5929b4bb1d89201 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2013-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ void RecordIOWriter::write(std::unique_ptr<IOBuf> buf) {
 #endif
 
   checkUnixError(bytes, "pwrite() failed");
-  DCHECK_EQ(bytes, totalLength);
+  DCHECK_EQ(size_t(bytes), totalLength);
 }
 
 RecordIOReader::RecordIOReader(File file, uint32_t fileId)
@@ -84,7 +84,7 @@ RecordIOReader::Iterator::Iterator(ByteRange range, uint32_t fileId, off_t pos)
     range_.clear();
   } else {
     recordAndPos_.second = pos;
-    range_.advance(pos);
+    range_.advance(size_t(pos));
     advanceToValid();
   }
 }
@@ -138,7 +138,7 @@ uint64_t dataHash(ByteRange range) {
   return hash::SpookyHashV2::Hash64(range.data(), range.size(), kHashSeed);
 }
 
-}  // namespace
+} // namespace
 
 size_t prependHeader(std::unique_ptr<IOBuf>& buf, uint32_t fileId) {
   if (fileId == 0) {
@@ -229,6 +229,6 @@ RecordInfo findRecord(ByteRange searchRange,
   return {0, {}};
 }
 
-}  // namespace
+} // namespace recordio_helpers
 
-}  // namespaces
+} // namespace folly