X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fhttp.cc;h=8c36371d0827529aab2db90c5155e2908fc8a97c;hb=bc253ff1c35b279eb008b3710be9977a333da618;hp=920fd021d647f34d1a01d257adcecad100b5b892;hpb=062e78da580009318a84372a7e117ab2a38869cb;p=m6w6%2Flibmemcached diff --git a/libtest/http.cc b/libtest/http.cc index 920fd021..8c36371d 100644 --- a/libtest/http.cc +++ b/libtest/http.cc @@ -56,7 +56,7 @@ static pthread_once_t start_key_once= PTHREAD_ONCE_INIT; void initialize_curl(void) { int ret; - if (pthread_once(&start_key_once, initialize_curl_startup) != 0) + if ((ret= pthread_once(&start_key_once, initialize_curl_startup)) != 0) { fatal_message(strerror(ret)); } @@ -70,8 +70,6 @@ namespace http { extern "C" size_t http_get_result_callback(void *ptr, size_t size, size_t nmemb, void *data) { - size_t body_size= size * nmemb; - vchar_t *_body= (vchar_t*)data; _body->resize(size * nmemb); @@ -102,6 +100,8 @@ HTTP::HTTP(const std::string& url_arg) : bool GET::execute() { + (void)init; + if (HAVE_LIBCURL) { #if defined(HAVE_LIBCURL) && HAVE_LIBCURL