This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Commit 581a3bb
object-file: use unsigned arithmetic with bit mask
33f379e (make object_directory.loose_objects_subdir_seen a bitmap,
2021-07-07) replaced a wasteful 256-byte array with a 32-byte array
and bit operations. The mask calculation shifts a literal 1 of type
int left by anything between 0 and 31. UndefinedBehaviorSanitizer
doesn't like that and reports:
object-file.c:2477:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Make sure to use an unsigned 1 instead to avoid the issue.
Signed-off-by: René Scharfe <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent dd3c8a7 commit 581a3bb
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2463 | 2463 | | |
2464 | 2464 | | |
2465 | 2465 | | |
2466 | | - | |
| 2466 | + | |
2467 | 2467 | | |
2468 | 2468 | | |
2469 | 2469 | | |
| |||
0 commit comments