summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llsdserialize_test.cpp
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-01 15:49:26 +0200
commitb42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 (patch)
treed73404c2fbacce379a57e2d03a6cd54558590859 /indra/llcommon/tests/llsdserialize_test.cpp
parentcb3bd8865aa0f9fb8a247ea595cf1973057ba91f (diff)
Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings
Diffstat (limited to 'indra/llcommon/tests/llsdserialize_test.cpp')
-rw-r--r--indra/llcommon/tests/llsdserialize_test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 56fdc51e82..fb2af1d2db 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -701,7 +701,7 @@ namespace tut
"<key>cam</key><real>1.23</real>"
"</map></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
}
template<> template<>
@@ -721,7 +721,7 @@ namespace tut
"<key>cam</key><real>1.23</real>"
"</map></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
v.clear();
v["amy"] = 23;
@@ -734,7 +734,7 @@ namespace tut
"<key>cam</key><real>1.23</real>"
"</map></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
v.clear();
v["amy"] = 23;
@@ -751,7 +751,7 @@ namespace tut
"<key>cam</key><real>1.23</real>"
"</map></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
v.clear();
v[0] = 23;
@@ -766,7 +766,7 @@ namespace tut
"<real>1.23</real>"
"</array></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
v.clear();
v[0] = 23;
@@ -782,7 +782,7 @@ namespace tut
"<real>1.23</real>"
"</array></llsd>",
v,
- v.size() + 1);
+ static_cast<S32>(v.size()) + 1);
}
template<> template<>
@@ -1405,13 +1405,13 @@ namespace tut
uint32_t size = htonl(1);
memcpy(&vec[1], &size, sizeof(uint32_t));
vec.push_back('k');
- int key_size_loc = vec.size();
+ auto key_size_loc = vec.size();
size = htonl(1); // 1 too short
vec.resize(vec.size() + 4);
memcpy(&vec[key_size_loc], &size, sizeof(uint32_t));
vec.push_back('a'); vec.push_back('m'); vec.push_back('y');
vec.push_back('i');
- int integer_loc = vec.size();
+ auto integer_loc = vec.size();
vec.resize(vec.size() + 4);
uint32_t val_int = htonl(23);
memcpy(&vec[integer_loc], &val_int, sizeof(uint32_t));
@@ -1473,7 +1473,7 @@ namespace tut
memcpy(&vec[1], &size, sizeof(uint32_t));
vec.push_back('"'); vec.push_back('a'); vec.push_back('m');
vec.push_back('y'); vec.push_back('"'); vec.push_back('i');
- int integer_loc = vec.size();
+ auto integer_loc = vec.size();
vec.resize(vec.size() + 4);
uint32_t val_int = htonl(23);
memcpy(&vec[integer_loc], &val_int, sizeof(uint32_t));