From c20df6aaa3d71c27a2b51a4ea0774c0edf598a70 Mon Sep 17 00:00:00 2001 From: Fabrizio Furano Date: Fri, 24 Jan 2014 11:22:20 +0100 Subject: [PATCH] Fix warnings --- src/XrdHttp/XrdHttpReq.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/XrdHttp/XrdHttpReq.cc b/src/XrdHttp/XrdHttpReq.cc index 243e227d9ac..867646adc51 100644 --- a/src/XrdHttp/XrdHttpReq.cc +++ b/src/XrdHttp/XrdHttpReq.cc @@ -446,12 +446,12 @@ int XrdHttpReq::ReqReadV() { return (j * sizeof (struct readahead_list)); } -std::string XrdHttpReq::buildPartialHdr(long long bytestart, long long byteend, long long filesize, char *token) { +std::string XrdHttpReq::buildPartialHdr(long long bytestart, long long byteend, long long fsz, char *token) { ostringstream s; s << "\r\n--" << token << "\r\n"; s << "Content-type: text/plain; charset=UTF-8\r\n"; - s << "Content-range: bytes " << bytestart << "-" << byteend << "/" << filesize << "\r\n\r\n"; + s << "Content-range: bytes " << bytestart << "-" << byteend << "/" << fsz << "\r\n\r\n"; return s.str(); } @@ -1282,7 +1282,7 @@ int XrdHttpReq::PostProcessHTTPReq(bool final_) { char *startp = (char *) iovP[0].iov_base, *endp = 0; char entry[1024]; DirListInfo e; - while (startp - (char *) iovP[0].iov_base < (unsigned) iovP[0].iov_len - 1) { + while ( (size_t)(startp - (char *) iovP[0].iov_base) < (size_t)( iovP[0].iov_len - 1) ) { // Find the filename, it comes before the \n if ((endp = (char *) strchr((const char*) startp, '\n'))) { strncpy(entry, (char *) startp, endp - startp); @@ -1781,7 +1781,7 @@ int XrdHttpReq::PostProcessHTTPReq(bool final_) { char entry[1024]; DirListInfo e; - while (startp - (char *) iovP[0].iov_base < (unsigned) iovP[0].iov_len - 1) { + while ( (size_t)(startp - (char *) iovP[0].iov_base) < (size_t)(iovP[0].iov_len - 1) ) { // Find the filename, it comes before the \n if ((endp = (char *) mystrchrnul((const char*) startp, '\n'))) { strncpy(entry, (char *) startp, endp - startp);