Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/7333

to look at the new patch set (#2).

pcu_sock.c: Avoid breaking strict-aliasing on ptr derreference

Fixes following warning:
pcu_sock.c: In function 'pcu_rx_data_req':
pcu_sock.c:406:3: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasing]
   tlli = *((uint32_t *)data_req->data);
   ^

Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a
---
M src/libbsc/pcu_sock.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/33/7333/2

diff --git a/src/libbsc/pcu_sock.c b/src/libbsc/pcu_sock.c
index caec40d..64422c7 100644
--- a/src/libbsc/pcu_sock.c
+++ b/src/libbsc/pcu_sock.c
@@ -403,7 +403,7 @@
                                        "invalid/small length %d\n", 
data_req->len);
                        break;
                }
-               tlli = *((uint32_t *)data_req->data);
+               memcpy(&tlli, data_req->data, 4);
 
                msg = msgb_alloc(data_req->len - 4, "pcu_agch");
                if (!msg) {

-- 
To view, visit https://gerrit.osmocom.org/7333
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5c93487c72d15b061e73ed4f9acbf2e77dec967a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder

Reply via email to