summaryrefslogtreecommitdiff
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorPhilip Oakley <philipoakley@iee.email>2021-12-01 00:29:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-01 22:48:09 (GMT)
commita43abad1e3bfb20864cd3873a4a8b86f845bae1a (patch)
treea64fa7b9261698d4c0d9b0be728e3b92bf99b07a /builtin/repack.c
parent35151cf0720460a897cde9b8039af364743240e7 (diff)
downloadgit-a43abad1e3bfb20864cd3873a4a8b86f845bae1a.zip
git-a43abad1e3bfb20864cd3873a4a8b86f845bae1a.tar.gz
git-a43abad1e3bfb20864cd3873a4a8b86f845bae1a.tar.bz2
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 <philipoakley@iee.email> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 0b2d1e5..6da6647 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -842,7 +842,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
fname_old = mkpathdup("%s-%s%s",
packtmp, item->string, exts[ext].name);
- if (((uintptr_t)item->util) & (1 << ext)) {
+ if (((uintptr_t)item->util) & ((uintptr_t)1 << ext)) {
struct stat statbuffer;
if (!stat(fname_old, &statbuffer)) {
statbuffer.st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);