cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_getinfo expects a pointer to char * for this info

From: Paul Howarth <paul_at_city-fan.org>
Date: Mon, 14 Mar 2011 16:41:14 +0000

On 14/03/11 16:33, Felix E. Klee wrote:
> Code snippet:
>
> char *data = malloc(100);
> if (data != NULL)
> curl_easy_getinfo(handle, CURLINFO_PRIVATE, data);
>
> Compilation:
>
> $ gcc -c -Wall -O3 -o retrieval.o retrieval.c
> retrieval.c: In function "on_wsquery_done":
> retrieval.c:129: warning: "wsquery" may be used uninitialized in this
> function
> In function "on_wsquery_done",
> inlined from "retrieval_retrieve" at retrieval.c:289:
> retrieval.c:122: warning: call to "_curl_easy_getinfo_err_string"
> declared with attribute warning: curl_easy_getinfo expects a pointer
> to char * for this info
>
> Any idea how to get rid of the warning?

use a pointer to char * instead of a pointer to char?

Paul.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-14