git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Philip Oakley <philipoakley@iee.email>
Cc: GitList <git@vger.kernel.org>, "René Scharfe" <l.s.r@web.de>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Taylor Blau" <me@ttaylorr.com>
Subject: Re: [PATCH v2 0/3] Fix LLP64 `(size_t)1` compatibility VS C4334 warnings
Date: Thu, 2 Dec 2021 15:56:27 -0500	[thread overview]
Message-ID: <cbcdcad7-16c5-b14d-5edc-5c91909b13e2@gmail.com> (raw)
In-Reply-To: <xmqq5ys8ym8s.fsf@gitster.g>

On 12/1/2021 5:49 PM, Junio C Hamano wrote:
> 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'.

I agree. This version is excellent.

-Stolee
 

      reply	other threads:[~2021-12-02 20:56 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 ` [PATCH v2 0/3] Fix LLP64 `(size_t)1` compatibility VS C4334 warnings Junio C Hamano
2021-12-02 20:56   ` Derrick Stolee [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbcdcad7-16c5-b14d-5edc-5c91909b13e2@gmail.com \
    --to=stolee@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    --cc=me@ttaylorr.com \
    --cc=philipoakley@iee.email \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).