summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-07-08 20:27:14 +0200
commit9fdca96f8bd2211a99fe88e57b70cbecefa20b6d (patch)
tree6b5d9b4310eb550c83fba23303bbbc77868af1a5 /indra/llcommon/tests
parent9ddf64c65183960ffed4fe61c5d85e8bacaea030 (diff)
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
Diffstat (limited to 'indra/llcommon/tests')
-rw-r--r--indra/llcommon/tests/lleventfilter_test.cpp14
-rw-r--r--indra/llcommon/tests/llsdserialize_test.cpp2
-rw-r--r--indra/llcommon/tests/lltrace_test.cpp4
-rw-r--r--indra/llcommon/tests/llunits_test.cpp2
4 files changed, 13 insertions, 9 deletions
diff --git a/indra/llcommon/tests/lleventfilter_test.cpp b/indra/llcommon/tests/lleventfilter_test.cpp
index a01d7fe415..d7b80e2545 100644
--- a/indra/llcommon/tests/lleventfilter_test.cpp
+++ b/indra/llcommon/tests/lleventfilter_test.cpp
@@ -81,13 +81,13 @@ class TestEventThrottle: public LLEventThrottleBase
public:
TestEventThrottle(F32 interval):
LLEventThrottleBase(interval),
- mAlarmRemaining(-1),
- mTimerRemaining(-1)
+ mAlarmRemaining(-1.f),
+ mTimerRemaining(-1.f)
{}
TestEventThrottle(LLEventPump& source, F32 interval):
LLEventThrottleBase(source, interval),
- mAlarmRemaining(-1),
- mTimerRemaining(-1)
+ mAlarmRemaining(-1.f),
+ mTimerRemaining(-1.f)
{}
/*----- implementation of LLEventThrottleBase timing functionality -----*/
@@ -100,12 +100,12 @@ public:
virtual bool alarmRunning() const /*override*/
{
// decrementing to exactly 0 should mean the alarm fires
- return mAlarmRemaining > 0;
+ return mAlarmRemaining > 0.f;
}
virtual void alarmCancel() /*override*/
{
- mAlarmRemaining = -1;
+ mAlarmRemaining = -1.f;
}
virtual void timerSet(F32 interval) /*override*/
@@ -116,7 +116,7 @@ public:
virtual F32 timerGetRemaining() const /*override*/
{
// LLTimer.getRemainingTimeF32() never returns negative; 0.0 means expired
- return (mTimerRemaining > 0.0)? mTimerRemaining : 0.0;
+ return (mTimerRemaining > 0.0f)? mTimerRemaining : 0.0f;
}
/*------------------- methods for manipulating time --------------------*/
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index fb2af1d2db..fae9f7023f 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -1809,7 +1809,7 @@ namespace tut
std::string q("\"");
std::string qPYTHON(q + PYTHON + q);
std::string qscript(q + scriptfile.getName() + q);
- int rc = _spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
+ int rc = (int)_spawnl(_P_WAIT, PYTHON.c_str(), qPYTHON.c_str(), qscript.c_str(),
std::forward<ARGS>(args)..., NULL);
if (rc == -1)
{
diff --git a/indra/llcommon/tests/lltrace_test.cpp b/indra/llcommon/tests/lltrace_test.cpp
index 8851f87b91..923a67ac8e 100644
--- a/indra/llcommon/tests/lltrace_test.cpp
+++ b/indra/llcommon/tests/lltrace_test.cpp
@@ -32,6 +32,10 @@
#include "lltracerecording.h"
#include "../test/lltut.h"
+#ifdef LL_WINDOWS
+#pragma warning(disable : 4244) // possible loss of data on conversions
+#endif
+
namespace LLUnits
{
// using powers of 2 to allow strict floating point equality
diff --git a/indra/llcommon/tests/llunits_test.cpp b/indra/llcommon/tests/llunits_test.cpp
index 49f2d3085a..98a58eb47e 100644
--- a/indra/llcommon/tests/llunits_test.cpp
+++ b/indra/llcommon/tests/llunits_test.cpp
@@ -262,7 +262,7 @@ namespace tut
F32 float_val = quatloos_implicit;
ensure("implicit units convert implicitly to regular values", float_val == 16);
- S32 int_val = quatloos_implicit;
+ S32 int_val = (S32)quatloos_implicit;
ensure("implicit units convert implicitly to regular values", int_val == 16);
// conversion of implicits