diff options
author | Philip Oakley <philipoakley@iee.email> | 2021-12-01 00:29:00 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-01 14:48:09 -0800 |
commit | a43abad1e3bfb20864cd3873a4a8b86f845bae1a (patch) | |
tree | a64fa7b9261698d4c0d9b0be728e3b92bf99b07a | |
parent | Sync with 2.34.1 (diff) | |
download | tgif-a43abad1e3bfb20864cd3873a4a8b86f845bae1a.tar.xz |
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>
-rw-r--r-- | builtin/repack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/repack.c b/builtin/repack.c index 0b2d1e5d82..6da66474fd 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); |