Skip to content

Commit 26de1fc

Browse files
PhilipOakleygitster
authored andcommitted
object-file.c: LLP64 compatibility, upcast unity for left shift
Visual Studio reports C4334 "was 64-bit shift intended" warning because of size miss-match. Promote unity to the matching type to fit with the assignment. Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62e8452 commit 26de1fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

object-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ struct oidtree *odb_loose_cache(struct object_directory *odb,
24252425
struct strbuf buf = STRBUF_INIT;
24262426
size_t word_bits = bitsizeof(odb->loose_objects_subdir_seen[0]);
24272427
size_t word_index = subdir_nr / word_bits;
2428-
size_t mask = 1u << (subdir_nr % word_bits);
2428+
size_t mask = (size_t)1u << (subdir_nr % word_bits);
24292429
uint32_t *bitmap;
24302430

24312431
if (subdir_nr < 0 ||

0 commit comments

Comments
 (0)