[PATCH] libosmo-sccp[master]: sccp_test_vty: Fix compilation warning: Unused variable

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Jun 21 13:59:10 UTC 2017


Review at  https://gerrit.osmocom.org/2994

sccp_test_vty: Fix compilation warning: Unused variable

Instead of removing the variable, leave it there with unused attribute
set because it is an example and gives extra information to potential
readers of the function (it provides you with the actual type of void* _scu).

Change-Id: Id5fddf261a7a75ee1d6e9aff0734065ebf8551ab
---
M examples/sccp_test_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/94/2994/1

diff --git a/examples/sccp_test_vty.c b/examples/sccp_test_vty.c
index ddfbb27..d809fbc 100644
--- a/examples/sccp_test_vty.c
+++ b/examples/sccp_test_vty.c
@@ -117,7 +117,7 @@
 
 static int testclnt_prim_cb(struct osmo_prim_hdr *oph, void *_scu)
 {
-	struct osmo_sccp_user *scu = _scu;
+	struct osmo_sccp_user *scu __attribute__((unused)) = _scu;
 	struct osmo_scu_prim *scu_prim = (struct osmo_scu_prim *) oph;
 
 	switch (OSMO_PRIM_HDR(&scu_prim->oph)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5fddf261a7a75ee1d6e9aff0734065ebf8551ab
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list