From bc49197ea84997d06dee6a92f60431de9fd0eb8c Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 17 Oct 2014 16:07:11 -0700 Subject: Update to build on Xcode 6.0: interesting - clang doesn't like it if you specify extra components of a format string that aren't populated in snprintf --- indra/llcorehttp/_httpoprequest.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 43dd069bc6..b121312ac0 100755 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -568,9 +568,18 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) (mReqLength ? fmt1 : fmt2), (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1)); #else - snprintf(range_line, sizeof(range_line), - (mReqLength ? fmt1 : fmt2), - (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1)); + if ( mReqLength ) + { + snprintf(range_line, sizeof(range_line), + fmt1, + (unsigned long) mReqOffset, (unsigned long) (mReqOffset + mReqLength - 1)); + } + else + { + snprintf(range_line, sizeof(range_line), + fmt2, + (unsigned long) mReqOffset); + } #endif // LL_WINDOWS range_line[sizeof(range_line) - 1] = '\0'; mCurlHeaders = curl_slist_append(mCurlHeaders, range_line); -- cgit v1.2.3 From 6a15d2d95ddb8dd285c635ff86f3a010c99d406c Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 17 Oct 2014 16:08:25 -0700 Subject: Update to build on Xcode 6.0: clang detecting unsigned int (size_t) comparison with <0 [-Wtautological-compare] --- indra/llcorehttp/bufferstream.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/bufferstream.cpp b/indra/llcorehttp/bufferstream.cpp index 6553900eef..678bf5ea9f 100755 --- a/indra/llcorehttp/bufferstream.cpp +++ b/indra/llcorehttp/bufferstream.cpp @@ -257,8 +257,6 @@ std::streampos BufferArrayStreamBuf::seekoff(std::streamoff off, return ret; } - if (pos < 0) - return ret; if (pos > mBufferArray->size()) { pos = mBufferArray->size(); -- cgit v1.2.3 From 217556cbaa1539db7392371b8b5ba97587341704 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 17 Oct 2014 16:11:04 -0700 Subject: Update to build on Xcode 6.0: remove unused code --- indra/llcorehttp/_httpoprequest.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'indra/llcorehttp') diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index b121312ac0..21fe1a613a 100755 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -91,7 +91,6 @@ char * os_strltrim(char * str); void os_strlower(char * str); // Error testing and reporting for libcurl status codes -void check_curl_easy_code(CURLcode code); void check_curl_easy_code(CURLcode code, int curl_setopt_option); } // end anonymous namespace @@ -1109,18 +1108,4 @@ void check_curl_easy_code(CURLcode code, int curl_setopt_option) } } - -void check_curl_easy_code(CURLcode code) -{ - if (CURLE_OK != code) - { - // Comment from old llcurl code which may no longer apply: - // - // linux appears to throw a curl error once per session for a bad initialization - // at a pretty random time (when enabling cookies). - LL_WARNS("CoreHttp") << "libcurl error detected: " << curl_easy_strerror(code) - << LL_ENDL; - } -} - } // end anonymous namespace -- cgit v1.2.3