On Mon, Mar 14, 2011 at 12:33 PM, Felix E. Klee <[email protected]> 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?
By passing a pointer to char *, accomplished by using &data in the call instead of data. Lars Nilsson ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
