curl-library
newer gcc -> more sample warnings (@Daniel)
Date: Wed, 04 Jul 2012 13:46:23 +0200
Hi Daniel,
I know you want to keep the samples as simple as possible, but I just
found that with gcc 4.7.0 we get a bunch of warnings like this:
gcc -I. -I../.. -I../../include -I../../lib -g -O2 -Wall
-fno-strict-aliasing -DCURL_STATICLIB -c anyauthput.c
anyauthput.c: In function 'main':
anyauthput.c:108:12: warning: variable 'res' set but not used
[-Wunused-but-set-variable]
I think we should add a minimal check there, something like:
res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ printf("curl_easy_perform() failed, code = %d\n", res);
do you agree with that?
Gün.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-04