projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6296342
)
Silence ubsan warning about 1<<31
author
Alan Modra
<amodra@gmail.com>
Tue, 31 Jan 2023 04:46:02 +0000
(15:16 +1030)
committer
Alan Modra
<amodra@gmail.com>
Tue, 31 Jan 2023 04:48:04 +0000
(15:18 +1030)
* merge.c (hash_blob): Write 1u << 31.
bfd/merge.c
patch
|
blob
|
history
diff --git
a/bfd/merge.c
b/bfd/merge.c
index f21154dcd45e0070bcb4bd135bffc0473f8753fd..327bd66b34190572399682d15e74cc353a482308 100644
(file)
--- a/
bfd/merge.c
+++ b/
bfd/merge.c
@@
-279,7
+279,7
@@
hash_blob (const char *str, unsigned int len)
uint32_t ret = 0;
uint32_t mul = (1 << 0) + (1 << 2) + (1 << 3) + (1 << 5) + (1 << 7);
mul += (1 << 11) + (1 << 13) + (1 << 17) + (0 << 19) + (1 << 23) + (1 << 29);
- mul += (1 << 31);
+ mul += (1
u
<< 31);
if (len >= 8)
{
uint32_t acc = len * 0x9e3779b1;