Re: [PATCH v0 3/3] Bigfile: teach "git add" to send a large file straight to a pack
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 29, 2011, 18:20 UTC
- Message-ID
- <BANLkTikB3VhB4nTZhjE+3znfVTuBYsnehg@mail.gmail.com>
- In-Reply-To
- <1304844455-23570-4-git-send-email-gitster@pobox.com>
On Sun, May 8, 2011 at 10:47, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> + char buf[10240];
> + size_t sz = size < sizeof(buf) ? size : sizeof(buf);
> + size_t actual;
> +
> + actual = read_in_full(fd, buf, sz);
> + if (actual < 0)
> + die_errno("index-stream: reading input");From clang:
sha1_file.c:2710:14: warning: comparison of unsigned expression <
0 is always false [-Wtautological-compare]
if (actual < 0)
~~~~~~ ^ ~Looks like it's right. size_t is unsigned according to the standard, so that die_errno() is never reached.