summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-05-16 14:36:17 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-05-16 14:47:42 +0200
commit1ba800e36c48e959948b4413832dda185c7a5ea8 (patch)
tree5a9254e803b8b26d05b24bbea670b0076446a745
parent920b22c4733dade054415a99de14e56eaaea1e7f (diff)
tests: xua_test: Fix array len computation
As warned by gcc 8.1.0: In file included from libosmo-sccp/include/osmocom/sigtran/osmo_ss7.h:7, from libosmo-sccp/include/../src/xua_internal.h:3, from libosmo-sccp/tests/xua/xua_test.c:21: /include/osmocom/core/utils.h:13:34: error: division ‘sizeof (const uint8_t (*)[12] {aka const unsigned char (*)[12]}) / sizeof (const uint8_t[12] {aka const unsigned char[12]})’ does not compute the number of array elements [-Werror=sizeof-pointer-div] #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ^ libosmo-sccp/tests/xua/xua_test.c:371:45: note: in expansion of macro ‘ARRAY_SIZE’ #define PARTARR(x, data) { .tag = x, .len = ARRAY_SIZE(data), .dat = (uint8_t *) data } Change-Id: Iad5703d68fee26fc83958741512820d2539e604e
-rw-r--r--tests/xua/xua_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/xua/xua_test.c b/tests/xua/xua_test.c
index 61f21d9..37ba645 100644
--- a/tests/xua/xua_test.c
+++ b/tests/xua/xua_test.c
@@ -387,8 +387,8 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.hdr = XUA_HDR(SUA_MSGC_CL, SUA_CL_CLDT),
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class0),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap),
- PARTARR(SUA_IEI_SRC_ADDR, &sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_SRC_ADDR, sua_addr_ssn_bssmap),
},
},
}, {
@@ -398,8 +398,8 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.hdr = XUA_HDR(SUA_MSGC_CL, SUA_CL_CLDT),
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class0),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap_pc1),
- PARTARR(SUA_IEI_SRC_ADDR, &sua_addr_ssn_bssmap_pc92),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap_pc1),
+ PARTARR(SUA_IEI_SRC_ADDR, sua_addr_ssn_bssmap_pc92),
},
},
}, {
@@ -409,8 +409,8 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.hdr = XUA_HDR(SUA_MSGC_CL, SUA_CL_CLDT),
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class0),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap_pc1),
- PARTARR(SUA_IEI_SRC_ADDR, &sua_addr_ssn_bssmap_pc92),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap_pc1),
+ PARTARR(SUA_IEI_SRC_ADDR, sua_addr_ssn_bssmap_pc92),
},
},
}, {
@@ -420,8 +420,8 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.hdr = XUA_HDR(SUA_MSGC_CL, SUA_CL_CLDT),
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class0),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap),
- PARTARR(SUA_IEI_SRC_ADDR, &sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_SRC_ADDR, sua_addr_ssn_bssmap),
},
},
}, {
@@ -432,7 +432,7 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class2),
PARTU32(SUA_IEI_SRC_REF, &sua_loc_ref_bsc),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap),
},
},
}, {
@@ -443,7 +443,7 @@ static const struct sccp2sua_testcase sccp2sua_testcases[] = {
.parts = {
PARTU32(SUA_IEI_PROTO_CLASS, &sua_proto_class2),
PARTU32(SUA_IEI_SRC_REF, &sua_loc_ref_msc),
- PARTARR(SUA_IEI_DEST_ADDR, &sua_addr_ssn_bssmap),
+ PARTARR(SUA_IEI_DEST_ADDR, sua_addr_ssn_bssmap),
},
},
}, {