From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.email>
Cc: GitList <git@vger.kernel.org>, "René Scharfe" <l.s.r@web.de>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Derrick Stolee" <stolee@gmail.com>,
"Taylor Blau" <me@ttaylorr.com>
Subject: Re: [PATCH v2 0/3] Fix LLP64 `(size_t)1` compatibility VS C4334 warnings
Date: Wed, 01 Dec 2021 14:49:07 -0800 [thread overview]
Message-ID: <xmqq5ys8ym8s.fsf@gitster.g> (raw)
In-Reply-To: <20211201002902.1042-1-philipoakley@iee.email> (Philip Oakley's message of "Wed, 1 Dec 2021 00:28:59 +0000")
Philip Oakley <philipoakley@iee.email> writes:
> Since V1 (gitster/po/size-t-for-vs)
> https://lore.kernel.org/git/20211126113614.709-1-philipoakley@iee.email/
>
> Former patch 1/4 was dropped as it was already in Junio's tree.
>
> Patch 1/3 corrects my spelling mistake.
>
> Patch 2/3 has added extra spacing around the << operator as suggested by
> Stollee[1].
>
> Patch 3/3 removes the superceded commit message comment regarding
> backporting the patch onto maint.
>
> The Visual Studio MSVC compilation reports a number of C4334 "was 64-bit
> shift intended" size mismatch warnings. In most of these cases a size_t
> is ANDed (masked) with a bit shift of 1, or 1U. On LLP64 systems the unity
> value is 32 bits, while size_t is 64 bits.
>
> The fix is to upcast the unity value to size_t.
>
> The first [dropped] patch had been reported [2] by René Scharfe as an extra patch
> to the rs/mergesort series.
>
> These fixes clear all the current C4334 warnings.
Thanks. Will queue; let's have it in 'next'.
next prev parent reply other threads:[~2021-12-01 22:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 0:28 [PATCH v2 0/3] Fix LLP64 `(size_t)1` compatibility VS C4334 warnings Philip Oakley
2021-12-01 0:29 ` [PATCH v2 1/3] repack.c: LLP64 compatibility, upcast unity for left shift Philip Oakley
2021-12-01 0:29 ` [PATCH v2 2/3] diffcore-delta.c: " Philip Oakley
2021-12-01 0:29 ` [PATCH v2 3/3] object-file.c: " Philip Oakley
2021-12-01 22:49 ` Junio C Hamano [this message]
2021-12-02 20:56 ` [PATCH v2 0/3] Fix LLP64 `(size_t)1` compatibility VS C4334 warnings Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq5ys8ym8s.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=me@ttaylorr.com \
--cc=philipoakley@iee.email \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.