Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9199 )

Change subject: tests: xua_test: Fix array len computation
......................................................................

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
---
M tests/xua/xua_test.c
1 file changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



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 @@
                        .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 @@
                        .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 @@
                        .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 @@
                        .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 @@
                        .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 @@
                        .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),
                        },
                },
        }, {

--
To view, visit https://gerrit.osmocom.org/9199
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iad5703d68fee26fc83958741512820d2539e604e
Gerrit-Change-Number: 9199
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Assignee: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to