Re: [PATCH v4 34/35] remote-curl: implement stateless-connect command
- From
- Brandon Williams <bmwill@google.com>
- Date
- Mar 5, 2018, 19:35 UTC
- Message-ID
- <20180305193506.GB162172@google.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1803022106030.56@ZVAVAG-6OXH6DA.rhebcr.pbec.zvpebfbsg.pbz>
On 03/02, Johannes Schindelin wrote:
Show 26 quoted lines
> Hi Brandon,
>
> On Wed, 28 Feb 2018, Brandon Williams wrote:
>
> > 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).Oh sorry, Looks like Junio put a patch ontop in pu to fix this. I'll squash that fix into this patch.
Thanks for catching this.
> > Ciao, > Dscho
-- Brandon Williams