aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-01-31 15:16:02 +1030
committerAlan Modra <amodra@gmail.com>2023-01-31 15:18:04 +1030
commitb3a3d7d90800b7c21ce8d82dbdbf17eeab163c7b (patch)
tree12ae2f5af2472f31ab1a58a347a586a4ebaf65df /bfd
parent6296342ec4473352483eaa82f0553d4a209319a1 (diff)
downloadgdb-b3a3d7d90800b7c21ce8d82dbdbf17eeab163c7b.zip
gdb-b3a3d7d90800b7c21ce8d82dbdbf17eeab163c7b.tar.gz
gdb-b3a3d7d90800b7c21ce8d82dbdbf17eeab163c7b.tar.bz2
Silence ubsan warning about 1<<31
* merge.c (hash_blob): Write 1u << 31.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/merge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/merge.c b/bfd/merge.c
index f21154d..327bd66 100644
--- 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 += (1u << 31);
if (len >= 8)
{
uint32_t acc = len * 0x9e3779b1;