summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-10 16:42:43 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-10 16:42:43 +0200
commitc0fad3028fd55c2067ce6a0ae4382cffe1014284 (patch)
tree1515516ba685b43c2b8dc97d3de62b782f61e7e2 /indra/llcommon
parent37e4c6911902b9dcec0192e8bb93bbaeacb1d60a (diff)
Re-enable compiler warnings C4018, C4100, C4231 and C4506
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llalignedarray.h4
-rw-r--r--indra/llcommon/llleap.cpp2
-rw-r--r--indra/llcommon/llpreprocessor.h6
-rw-r--r--indra/llcommon/llsingleton.h4
-rw-r--r--indra/llcommon/llstreamqueue.h2
5 files changed, 8 insertions, 10 deletions
diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h
index 0ba8b34cb6..8248f82186 100644
--- a/indra/llcommon/llalignedarray.h
+++ b/indra/llcommon/llalignedarray.h
@@ -116,7 +116,7 @@ void LLAlignedArray<T, alignment>::resize(U32 size)
template <class T, U32 alignment>
T& LLAlignedArray<T, alignment>::operator[](int idx)
{
- if(idx >= mElementCount || idx < 0)
+ if (idx < 0 || unsigned(idx) >= mElementCount)
{
LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
}
@@ -126,7 +126,7 @@ T& LLAlignedArray<T, alignment>::operator[](int idx)
template <class T, U32 alignment>
const T& LLAlignedArray<T, alignment>::operator[](int idx) const
{
- if (idx >= mElementCount || idx < 0)
+ if (idx < 0 || unsigned(idx) >= mElementCount)
{
LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
}
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index e93ba83434..662a2511cd 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -233,7 +233,7 @@ public:
LL_DEBUGS("EventHost") << "Sending: "
<< static_cast<U64>(buffer.tellp()) << ':';
- std::string::size_type truncate(80);
+ llssize truncate(80);
if (buffer.tellp() <= truncate)
{
LL_CONT << buffer.str();
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 0c5799ad96..65ecd573e4 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -124,12 +124,7 @@
#if LL_MSVC
#pragma warning( disable : 4996 ) // warning: deprecated
-// Linker optimization with "extern template" generates these warnings
-#pragma warning( disable : 4231 ) // nonstandard extension used : 'extern' before template explicit instantiation
-#pragma warning( disable : 4506 ) // no definition for inline function
-
// level 4 warnings that we need to disable:
-#pragma warning (disable : 4100) // unreferenced formal parameter
#pragma warning (disable : 4127) // conditional expression is constant (e.g. while(1) )
#pragma warning (disable : 4244) // possible loss of data on conversions
#pragma warning (disable : 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template
@@ -138,7 +133,6 @@
#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
-#pragma warning (disable : 4018) // '<' : signed/unsigned mismatch
#endif // LL_MSVC
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h
index 0a7086e819..5952cbdd87 100644
--- a/indra/llcommon/llsingleton.h
+++ b/indra/llcommon/llsingleton.h
@@ -36,6 +36,10 @@
#include "llthread.h" // on_main_thread()
#include "llmainthreadtask.h"
+#ifdef LL_WINDOWS
+#pragma warning( disable : 4506 ) // no definition for inline function
+#endif
+
class LLSingletonBase: private boost::noncopyable
{
public:
diff --git a/indra/llcommon/llstreamqueue.h b/indra/llcommon/llstreamqueue.h
index a09bf4cb4b..01689457dd 100644
--- a/indra/llcommon/llstreamqueue.h
+++ b/indra/llcommon/llstreamqueue.h
@@ -216,7 +216,7 @@ std::streamsize LLGenericStreamQueue<Ch>::skip(std::streamsize n)
{
typename BufferList::iterator bli(mBuffer.begin()), blend(mBuffer.end());
std::streamsize toskip(n), skipped(0);
- while (bli != blend && toskip >= bli->length())
+ while (bli != blend && (size_t)toskip >= bli->length())
{
std::streamsize chunk(bli->length());
typename BufferList::iterator zap(bli++);