18 lines
659 B
Diff
18 lines
659 B
Diff
2019-03-08 Jonathan Wakely <jwakely@redhat.com>
|
|
|
|
PR libstdc++/89629
|
|
* libsupc++/hash_bytes.cc (std::_Hash_bytes): Change len_aligned type
|
|
from int to size_t.
|
|
|
|
--- libstdc++-v3/libsupc++/hash_bytes.cc
|
|
+++ libstdc++-v3/libsupc++/hash_bytes.cc
|
|
@@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|
|
|
// Remove the bytes not divisible by the sizeof(size_t). This
|
|
// allows the main loop to process the data as 64-bit integers.
|
|
- const int len_aligned = len & ~0x7;
|
|
+ const size_t len_aligned = len & ~0x7;
|
|
const char* const end = buf + len_aligned;
|
|
size_t hash = seed ^ (len * mul);
|
|
for (const char* p = buf; p != end; p += 8)
|