This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git
The following commit(s) were added to refs/heads/master by this push:
new 545f2b2 cborattr/test: Add type casting for 64-bit architecture
545f2b2 is described below
commit 545f2b214402b46b7d8c2ffb86b7b65996c93422
Author: Michal Gorecki <[email protected]>
AuthorDate: Fri Jul 14 12:53:42 2023 +0200
cborattr/test: Add type casting for 64-bit architecture
This allows running newt unit tests on 64-bit architecture.
Without it, compilation errors were occuring (type mismatch).
---
cborattr/test/src/testcases/cborattr_decode_int_array.c | 8 ++++----
cborattr/test/src/testcases/cborattr_decode_object.c | 6 +++---
cborattr/test/src/testcases/cborattr_decode_simple.c | 4 ++--
cborattr/test/src/testcases/cborattr_decode_unnamed_array.c | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/cborattr/test/src/testcases/cborattr_decode_int_array.c
b/cborattr/test/src/testcases/cborattr_decode_int_array.c
index 96bc8cc..ae7fff8 100644
--- a/cborattr/test/src/testcases/cborattr_decode_int_array.c
+++ b/cborattr/test/src/testcases/cborattr_decode_int_array.c
@@ -83,7 +83,7 @@ TEST_CASE(test_cborattr_decode_int_array)
.attribute = "a",
.type = CborAttrArrayType,
.addr.array.element_type = CborAttrIntegerType,
- .addr.array.arr.integers.store = arr_data,
+ .addr.array.arr.integers.store = (long long int *) arr_data,
.addr.array.count = &arr_cnt,
.addr.array.maxlen = sizeof(arr_data) / sizeof(arr_data[0]),
.nodefault = true
@@ -91,7 +91,7 @@ TEST_CASE(test_cborattr_decode_int_array)
[1] = {
.attribute = "b",
.type = CborAttrIntegerType,
- .addr.integer = &b_int,
+ .addr.integer = (long long int *) &b_int,
.dflt.integer = 1
},
[2] = {
@@ -103,7 +103,7 @@ TEST_CASE(test_cborattr_decode_int_array)
.attribute = "a",
.type = CborAttrArrayType,
.addr.array.element_type = CborAttrIntegerType,
- .addr.array.arr.integers.store = arr_data,
+ .addr.array.arr.integers.store = (long long int *) arr_data,
.addr.array.count = &arr_cnt,
.addr.array.maxlen = 1,
.nodefault = true
@@ -111,7 +111,7 @@ TEST_CASE(test_cborattr_decode_int_array)
[1] = {
.attribute = "b",
.type = CborAttrIntegerType,
- .addr.integer = &b_int,
+ .addr.integer = (long long int *) &b_int,
.dflt.integer = 1
},
[2] = {
diff --git a/cborattr/test/src/testcases/cborattr_decode_object.c
b/cborattr/test/src/testcases/cborattr_decode_object.c
index 25a32d2..358d379 100644
--- a/cborattr/test/src/testcases/cborattr_decode_object.c
+++ b/cborattr/test/src/testcases/cborattr_decode_object.c
@@ -115,7 +115,7 @@ TEST_CASE(test_cborattr_decode_object)
[0] = {
.attribute = "bm",
.type = CborAttrIntegerType,
- .addr.integer = &bm_val,
+ .addr.integer = (long long int *) &bm_val,
.nodefault = true
},
[1] = {
@@ -139,7 +139,7 @@ TEST_CASE(test_cborattr_decode_object)
[0] = {
.attribute = "i",
.type = CborAttrIntegerType,
- .addr.integer = &i_val,
+ .addr.integer = (long long int *) &i_val,
.nodefault = true
},
[1] = {
@@ -167,7 +167,7 @@ TEST_CASE(test_cborattr_decode_object)
[1] = {
.attribute = "a",
.type = CborAttrIntegerType,
- .addr.integer = &a_val,
+ .addr.integer = (long long int *) &a_val,
.nodefault = true
},
[2] = {
diff --git a/cborattr/test/src/testcases/cborattr_decode_simple.c
b/cborattr/test/src/testcases/cborattr_decode_simple.c
index 9e206e1..e899f1e 100644
--- a/cborattr/test/src/testcases/cborattr_decode_simple.c
+++ b/cborattr/test/src/testcases/cborattr_decode_simple.c
@@ -91,13 +91,13 @@ TEST_CASE(test_cborattr_decode_simple)
[0] = {
.attribute = "a",
.type = CborAttrIntegerType,
- .addr.uinteger = &a_val,
+ .addr.uinteger = (long long unsigned int *) &a_val,
.nodefault = true
},
[1] = {
.attribute = "b",
.type = CborAttrIntegerType,
- .addr.integer = &b_val,
+ .addr.integer = (long long int *) &b_val,
.nodefault = true
},
[2] = {
diff --git a/cborattr/test/src/testcases/cborattr_decode_unnamed_array.c
b/cborattr/test/src/testcases/cborattr_decode_unnamed_array.c
index c4446b8..5edb537 100644
--- a/cborattr/test/src/testcases/cborattr_decode_unnamed_array.c
+++ b/cborattr/test/src/testcases/cborattr_decode_unnamed_array.c
@@ -78,7 +78,7 @@ TEST_CASE(test_cborattr_decode_unnamed_array)
.attribute = CBORATTR_ATTR_UNNAMED,
.type = CborAttrArrayType,
.addr.array.element_type = CborAttrIntegerType,
- .addr.array.arr.integers.store = arr_data,
+ .addr.array.arr.integers.store = (long long int *) arr_data,
.addr.array.count = &arr_cnt,
.addr.array.maxlen = sizeof(arr_data) / sizeof(arr_data[0]),
.nodefault = true