mirror of
https://github.com/git/git.git
synced 2024-09-23 15:32:57 +02:00
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>
This commit is contained in:
parent
35151cf072
commit
a43abad1e3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user