From: Junio C Hamano <gitster@pobox•com>
To: Brian Gernhardt <brian@gernhardtsoftware•com>
Cc: Git List <git@vger•kernel.org>
Subject: Re: [PATCH] Receive-pack: include entire SHA1 in nonce
Date: Thu, 25 Sep 2014 09:23:14 -0700 [thread overview]
Message-ID: <xmqqoau3brf1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1411657340-62950-1-git-send-email-brian@gernhardtsoftware.com> (Brian Gernhardt's message of "Thu, 25 Sep 2014 11:02:20 -0400")
Brian Gernhardt <brian@gernhardtsoftware•com> writes:
> clang gives the following warning:
>
> builtin/receive-pack.c:327:35: error: sizeof on array function
> parameter will return size of 'unsigned char *' instead of 'unsigned
> char [20]' [-Werror,-Wsizeof-array-argument]
> git_SHA1_Update(&ctx, out, sizeof(out));
> ^
> builtin/receive-pack.c:292:37: note: declared here
> static void hmac_sha1(unsigned char out[20],
> ^
> ---
>
> I dislike changing sizeof to a magic constant, but clang informs me that
> sizeof is doing the wrong thing.
Thanks. I knew the code was wrong when I wrote it but somehow it
ended up as I wrote X-<. Let me find a brown paper bag ;-)
next prev parent reply other threads:[~2014-09-25 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 15:02 [PATCH] Receive-pack: include entire SHA1 in nonce Brian Gernhardt
2014-09-25 16:23 ` Junio C Hamano [this message]
2014-09-25 16:35 ` Junio C Hamano
2014-09-25 17:54 ` Junio C Hamano
2014-09-25 18:03 ` Brian Gernhardt
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=xmqqoau3brf1.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=brian@gernhardtsoftware$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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