git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v0 3/3] Bigfile: teach "git add" to send a large file straight to a pack
Date: Sun, 29 May 2011 20:20:01 +0200	[thread overview]
Message-ID: <BANLkTikB3VhB4nTZhjE+3znfVTuBYsnehg@mail.gmail.com> (raw)
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:

> +               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.

  parent reply	other threads:[~2011-05-29 18:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08  8:47 [PATCH v0 0/3] git add a-Big-file Junio C Hamano
2011-05-08  8:47 ` [PATCH v0 1/3] index_fd(): turn write_object and format_check arguments into one flag Junio C Hamano
2011-05-08  8:47 ` [PATCH v0 2/3] index_fd(): split into two helper functions Junio C Hamano
2011-05-08  8:47 ` [PATCH v0 3/3] Bigfile: teach "git add" to send a large file straight to a pack Junio C Hamano
2011-05-08 10:19   ` Nguyen Thai Ngoc Duy
2011-05-08 17:37     ` Junio C Hamano
2011-05-09 22:04     ` [PATCH 0/4] convert.c clean-up Junio C Hamano
2011-05-09 22:04       ` [PATCH 1/4] convert: rename the "eol" global variable to "core_eol" Junio C Hamano
2011-05-09 22:04       ` [PATCH 2/4] convert: give saner names to crlf/eol variables, types and functions Junio C Hamano
2011-05-09 22:05       ` [PATCH 3/4] convert: make it safer to add conversion attributes Junio C Hamano
2011-05-09 22:05       ` [PATCH 4/4] convert: make it harder to screw up adding a conversion attribute Junio C Hamano
2011-05-10 12:59       ` [PATCH 0/4] convert.c clean-up Nguyen Thai Ngoc Duy
2011-05-10 14:09         ` Junio C Hamano
2011-05-09 14:05   ` [PATCH v0 3/3] Bigfile: teach "git add" to send a large file straight to a pack Shawn Pearce
2011-05-09 15:58     ` Junio C Hamano
2011-05-09 16:14       ` Junio C Hamano
2011-05-29 18:20   ` Ævar Arnfjörð Bjarmason [this message]
2011-05-29 20:29     ` Junio C Hamano

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=BANLkTikB3VhB4nTZhjE+3znfVTuBYsnehg@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 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 NNTP newsgroup(s).