Re: [PATCH v4 34/35] remote-curl: implement stateless-connect command
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 2, 2018, 20:07 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1803022106030.56@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
- In-Reply-To
- <20180228232252.102167-35-bmwill@google.com>
Hi Brandon,
On Wed, 28 Feb 2018, Brandon Williams wrote:
Show 16 quoted lines
> diff --git a/remote-curl.c b/remote-curl.c
> index 66a53f74b..3f882d766 100644
> --- a/remote-curl.c
> +++ b/remote-curl.c
> @@ -188,7 +188,12 @@ static struct ref *parse_git_refs(struct discovery *heads, int for_push)
> [...]
> +static size_t proxy_in(char *buffer, size_t eltsize,
> + size_t nmemb, void *userdata)
> +{
> + size_t max;
> + struct proxy_state *p = userdata;
> + size_t avail = p->request_buffer.len - p->pos;
> +
> +
> + if (eltsize != 1)
> + BUG("curl read callback called with size = %zu != 1", eltsize);The format specified %z is not actually portable. Please use PRIuMAX and cast to (uintmax_t) instead.
This breaks the Windows build of `pu` (before that, there was still a test failure that I did not have the time to chase down).
Ciao, Dscho