[S] Change in osmo-bsc[master]: abis_nm: fix -Wunused-but-set-variable (bug)
Attention is currently required from: fixeria, laforge. pespin has uploaded a new patch set (#3) to the change originally created by fixeria. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email ) The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: abis_nm: fix -Wunused-but-set-variable (bug) ...................................................................... abis_nm: fix -Wunused-but-set-variable (bug) clang warns us about 'len' being set, but not used: And this is abis_nm.c:2172:10: warning: variable 'len' set but not used [-Wunused-but-set-variable] uint8_t len = attr_len; ^ This is actually a bug, because in the case of NACK we append 2 more bytes {NM_ATT_NACK_CAUSES, NM_NACK_OBJCLASS_NOTSUPP}, and we need to pass the final length to fill_om_fom_hdr(), including those optional two bytes. Passing 'attr_len' (length of 'attr') is wrong. Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc --- M src/osmo-bsc/abis_nm.c 1 file changed, 21 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/91/35791/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35791?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc Gerrit-Change-Number: 35791 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newpatchset
participants (1)
-
pespin