cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_easy_getinfo expects a pointer to char * for this info

From: Felix E. Klee <felix.klee_at_inka.de>
Date: Mon, 14 Mar 2011 17:33:43 +0100

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?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-14