Skip to content

Commit a43abad

Browse files
PhilipOakleygitster
authored andcommitted
repack.c: LLP64 compatibility, upcast unity for left shift
Visual Studio reports C4334 "was 64-bit shift intended" warning because of size mismatch. Promote unity to the matching type to fit with the `&` operator. Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 35151cf commit a43abad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/repack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
842842
fname_old = mkpathdup("%s-%s%s",
843843
packtmp, item->string, exts[ext].name);
844844

845-
if (((uintptr_t)item->util) & (1 << ext)) {
845+
if (((uintptr_t)item->util) & ((uintptr_t)1 << ext)) {
846846
struct stat statbuffer;
847847
if (!stat(fname_old, &statbuffer)) {
848848
statbuffer.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);

0 commit comments

Comments
 (0)