On Fri, 21 Jan 2022 at 13:11, Daniel Stenberg <[email protected]> wrote: > > On Fri, 21 Jan 2022, Gavin Henry via curl-library wrote: > > > json_t *json = outstream; > > json = json_loadb(buffer, size * nmemb, 0, NULL); > > > > "The value is never used". I'll leave gcc and clang to sort. > > The first statement here is pointless since you discard the contents and > assign it again in the second line, which doesn't look right. I think you > probably want something similar to: > > json_t **json = outstream; > *json = json_loadb(buffer, size * nmemb, 0, NULL); > > Because outside of the callback you pass do: > > json_t *json = 0; > curl_easy_setopt(curl, CURLOPT_WRITEDATA, &json); > > ... so that's a pointer to a pointer. >
Thanks. Yeah, this is messy. -- Kind Regards, Gavin Henry. https://sentrypeer.org -- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
