diff --git a/src/osgPlugins/curl/ReaderWriterCURL.cpp b/src/osgPlugins/curl/ReaderWriterCURL.cpp index c682a76c5..e0562f6d8 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.cpp +++ b/src/osgPlugins/curl/ReaderWriterCURL.cpp @@ -378,7 +378,7 @@ ReaderWriterCURL::ReaderWriterCURL() supportsProtocol("https","Read from https port using libcurl."); supportsProtocol("ftp","Read from ftp port using libcurl."); supportsProtocol("ftps","Read from ftps port using libcurl."); - + supportsExtension("curl","Pseudo file extension, used to select curl plugin."); supportsExtension("*","Passes all read files to other plugins to handle actual model loading."); supportsOption("OSG_CURL_PROXY","Specify the http proxy."); @@ -706,8 +706,7 @@ bool ReaderWriterCURL::read(std::istream& fin, std::string& destination) const } #endif -size_t empty_write_data(const char *buffer, size_t size, size_t nmemb, char -*userp) +size_t empty_write_data(const char* /*buffer*/, size_t size, size_t nmemb, char* /*userp*/) { return size*nmemb; } @@ -726,12 +725,12 @@ bool ReaderWriterCURL::fileExists(const std::string& filename, const osgDB::Opti curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, &empty_write_data); int result = curl_easy_perform(curl_handle); - + long http_return_code(0); curl_easy_getinfo(curl_handle, CURLINFO_RESPONSE_CODE, &http_return_code); - + curl_easy_cleanup(curl_handle); - + return ((result == 0) && ((http_return_code == 200) || (http_return_code == 0))); } else diff --git a/src/osgPlugins/curl/ReaderWriterCURL.h b/src/osgPlugins/curl/ReaderWriterCURL.h index ad65786c7..bac63bcd9 100644 --- a/src/osgPlugins/curl/ReaderWriterCURL.h +++ b/src/osgPlugins/curl/ReaderWriterCURL.h @@ -79,7 +79,7 @@ class EasyCurl : public osg::Referenced virtual ~EasyCurl(); // disallow copying - EasyCurl(const EasyCurl& rhs):_curl(rhs._curl) {} + EasyCurl(const EasyCurl& rhs) : osg::Referenced(rhs), _curl(rhs._curl) {} EasyCurl& operator = (const EasyCurl&) { return *this; } void setOptions(const std::string& proxyAddress, const std::string& fileName, StreamObject& sp, const osgDB::ReaderWriter::Options *options);