Make folly pass TSAN checks
[folly.git] / folly / Varint.h
index 07968799f8a265cc3546de8cbcf5c556c2e70299..4664cb95d4f5c4e2aa33efdb95f3398199ff1b53 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ inline size_t encodeVarint(uint64_t val, uint8_t* buf) {
     val >>= 7;
   }
   *p++ = uint8_t(val);
-  return p - buf;
+  return size_t(p - buf);
 }
 
 template <class T>