Don't use pthread_spinlock_t in TimedRWMutex
[folly.git] / folly / Checksum.cpp
index c8dbec10c90061f9101c2825599c01a2782ead3a..6ec07893265288a41cd314ddfc61187932a72e71 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.
@@ -52,7 +52,7 @@ uint32_t crc32c_hw(const uint8_t *data, size_t nbytes,
   // Process 8 bytes at a time until we have fewer than 8 bytes left.
   while (offset + sizeof(uint64_t) <= nbytes) {
     const uint64_t* src = (const uint64_t*)(data + offset);
-    sum = _mm_crc32_u64(sum, *src);
+    sum = uint32_t(_mm_crc32_u64(sum, *src));
     offset += sizeof(uint64_t);
   }