diff options
| author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-07-08 20:27:14 +0200 | 
|---|---|---|
| committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-07-08 20:27:14 +0200 | 
| commit | 9fdca96f8bd2211a99fe88e57b70cbecefa20b6d (patch) | |
| tree | 6b5d9b4310eb550c83fba23303bbbc77868af1a5 /indra/llmessage | |
| parent | 9ddf64c65183960ffed4fe61c5d85e8bacaea030 (diff) | |
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llbuffer.cpp | 16 | ||||
| -rw-r--r-- | indra/llmessage/llbufferstream.cpp | 4 | ||||
| -rw-r--r-- | indra/llmessage/llcircuit.cpp | 4 | ||||
| -rw-r--r-- | indra/llmessage/lliohttpserver.cpp | 2 | 
4 files changed, 13 insertions, 13 deletions
| diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index dc7115b167..3a4b493b26 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -142,7 +142,7 @@ LLHeapBuffer::~LLHeapBuffer()  S32 LLHeapBuffer::bytesLeft() const  { -    return (mSize - (mNextFree - mBuffer)); +    return (mSize - (S32)(mNextFree - mBuffer));  }  // virtual @@ -371,11 +371,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)          return it;      }      S32 channel = (*it).getChannel(); -    LLSegment segment1(channel, base, (address - base) + 1); +    LLSegment segment1(channel, base, (S32)((address - base) + 1));      *it = segment1;      segment_iterator_t rv = it;      ++it; -    LLSegment segment2(channel, address + 1, size - (address - base) - 1); +    LLSegment segment2(channel, address + 1, (S32)(size - (address - base) - 1));      mSegments.insert(it, segment2);      return rv;  } @@ -424,7 +424,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(                      segment = LLSegment(                          (*rv).getChannel(),                          address, -                        (*rv).size() - (address - (*rv).data())); +                        (*rv).size() - (S32)(address - (*rv).data()));                  }                  else                  { @@ -533,7 +533,7 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const          if(++start < ((*it).data() + (*it).size()))          {              // it's in the same segment -            offset = start - (*it).data(); +            offset = (S32)(start - (*it).data());          }          else if(++it == end)          { @@ -586,7 +586,7 @@ U8* LLBufferArray::readAfter(             && (*it).isOnChannel(channel))          {              // copy the data out of this segment -            S32 bytes_in_segment = (*it).size() - (start - (*it).data()); +            S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());              bytes_to_copy = llmin(bytes_left, bytes_in_segment);              memcpy(dest, start, bytes_to_copy); /*Flawfinder: ignore*/              len += bytes_to_copy; @@ -681,7 +681,7 @@ U8* LLBufferArray::seek(          {              if(delta > 0)              { -                S32 bytes_in_segment = (*it).size() - (start - (*it).data()); +                S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data());                  S32 local_delta = llmin(delta, bytes_in_segment);                  rv += local_delta;                  delta -= local_delta; @@ -689,7 +689,7 @@ U8* LLBufferArray::seek(              }              else              { -                S32 bytes_in_segment = start - (*it).data(); +                S32 bytes_in_segment = (S32)(start - (*it).data());                  S32 local_delta = llmin(llabs(delta), bytes_in_segment);                  rv -= local_delta;                  delta += local_delta; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index e51b489813..2c745f6fe4 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff(          }          LLMutexLock lock(mBuffer->getMutex()); -        address = mBuffer->seek(mChannels.in(), base_addr, off); +        address = mBuffer->seek(mChannels.in(), base_addr, (S32)off);          if(address)          {              LLBufferArray::segment_iterator_t iter; @@ -306,7 +306,7 @@ streampos LLBufferStreamBuf::seekoff(          }          LLMutexLock lock(mBuffer->getMutex()); -        address = mBuffer->seek(mChannels.out(), base_addr, off); +        address = mBuffer->seek(mChannels.out(), base_addr, (S32)off);          if(address)          {              LLBufferArray::segment_iterator_t iter; diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index bf22f3d3f0..8f9c02bdca 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -525,13 +525,13 @@ void LLCircuitData::checkPeriodTime()      F64Seconds period_length = mt_sec - mPeriodTime;      if ( period_length > TARGET_PERIOD_LENGTH)      { -        F32 bps_in = F32Bits(mBytesInThisPeriod).value() / period_length.value(); +        F32 bps_in = F32Bits(mBytesInThisPeriod).value() / (F32)period_length.value();          if (bps_in > mPeakBPSIn)          {              mPeakBPSIn = bps_in;          } -        F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / period_length.value(); +        F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / (F32)period_length.value();          if (bps_out > mPeakBPSOut)          {              mPeakBPSOut = bps_out; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index e562f09844..edc431e538 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -625,7 +625,7 @@ bool LLHTTPResponder::readHeaderLine(          }          return false;      } -    S32 offset = -((len - 1) - (newline - dest)); +    S32 offset = -((len - 1) - (S32)(newline - dest));      ++newline;      *newline = '\0';      mLastRead = buffer->seek(channels.in(), last, offset); | 
