[MERGED] 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Jun 22 06:23:06 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: sccp_test_vty: Fix compilation warning: Unused variable
......................................................................


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(-)

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



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: merged
Gerrit-Change-Id: Id5fddf261a7a75ee1d6e9aff0734065ebf8551ab
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list