misc: Address compiler warning on unused variables

abis_nm.c: In function ‘abis_nm_get_attr’:
abis_nm.c:1380:11: warning: unused variable ‘cur’ [-Wunused-variable]

abis_nm.c: In function ‘ipac_parse_bcch_info’:
abis_nm.c:2588:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]

bts_nokia_site.c:1310:6: warning: variable ‘constructed’ set but not used [-Wunused-but-set-variable]
bts_nokia_site.c: At top level:
bts_nokia_site.c:1364:12: warning: ‘dump_elements’ defined but not used [-Wunused-function]

gsm_04_08.c: In function ‘mm_rx_loc_upd_req’:
gsm_04_08.c:521:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

osmo_msc.c: In function ‘msc_ciph_m_compl’:
osmo_msc.c:122:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hslfemto_bootstrap_om’:
bts_hsl_femtocell.c:101:11: warning: variable ‘cur’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hsl_drop_oml’:
bts_hsl_femtocell.c:232:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable]

handover_logic.c: In function ‘ho_chan_activ_ack’:
handover_logic.c:197:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index ee0dd60..23d5fa3 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -1377,7 +1377,6 @@
 {
 	struct abis_om_hdr *oh;
 	struct msgb *msg = nm_msgb_alloc();
-	uint8_t *cur;
 
 	DEBUGP(DNM, "Get Attr (bts=%d)\n", bts->nr);
 
@@ -2586,7 +2585,7 @@
 int ipac_parse_bcch_info(struct ipac_bcch_info *binf, uint8_t *buf)
 {
 	uint8_t *cur = buf;
-	uint16_t len;
+	uint16_t len __attribute__((unused));
 
 	memset(binf, 0, sizeof(*binf));
 
diff --git a/openbsc/src/libbsc/bts_hsl_femtocell.c b/openbsc/src/libbsc/bts_hsl_femtocell.c
index ebab34a..2187245 100644
--- a/openbsc/src/libbsc/bts_hsl_femtocell.c
+++ b/openbsc/src/libbsc/bts_hsl_femtocell.c
@@ -98,23 +98,22 @@
 static int hslfemto_bootstrap_om(struct gsm_bts *bts)
 {
 	struct msgb *msg;
-	uint8_t *cur;
 
 	msg = hsl_alloc_msgb();
-	cur = msgb_put(msg, sizeof(l1_msg));
+	msgb_put(msg, sizeof(l1_msg));
 	memcpy(msg->data, l1_msg, sizeof(l1_msg));
 	msg->dst = bts->c0->rsl_link;
 	abis_rsl_sendmsg(msg);
 
 #if 1
 	msg = hsl_alloc_msgb();
-	cur = msgb_put(msg, sizeof(conn_trau_msg));
+	msgb_put(msg, sizeof(conn_trau_msg));
 	memcpy(msg->data, conn_trau_msg, sizeof(conn_trau_msg));
 	msg->dst = bts->c0->rsl_link;
 	abis_rsl_sendmsg(msg);
 #endif
 	msg = hsl_alloc_msgb();
-	cur = msgb_put(msg, sizeof(conn_trau_msg2));
+	msgb_put(msg, sizeof(conn_trau_msg2));
 	memcpy(msg->data, conn_trau_msg2, sizeof(conn_trau_msg2));
 	msg->dst = bts->c0->rsl_link;
 	abis_rsl_sendmsg(msg);
@@ -123,7 +122,7 @@
 	oml_arfcn_bsic[13] = bts->bsic;
 
 	msg = hsl_alloc_msgb();
-	cur = msgb_put(msg, sizeof(oml_arfcn_bsic));
+	msgb_put(msg, sizeof(oml_arfcn_bsic));
 	memcpy(msg->data, oml_arfcn_bsic, sizeof(oml_arfcn_bsic));
 	msg->dst = bts->c0->rsl_link;
 	abis_sendmsg(msg);
@@ -229,12 +228,9 @@
 
 void hsl_drop_oml(struct gsm_bts *bts)
 {
-	struct e1inp_line *line;
-
 	if (!bts->oml_link)
 		return;
 
-	line = bts->oml_link->ts->line;
 	e1inp_sign_link_destroy(bts->oml_link);
 	bts->oml_link = NULL;
 
diff --git a/openbsc/src/libbsc/bts_nokia_site.c b/openbsc/src/libbsc/bts_nokia_site.c
index b2749b5..36e3fac 100644
--- a/openbsc/src/libbsc/bts_nokia_site.c
+++ b/openbsc/src/libbsc/bts_nokia_site.c
@@ -51,7 +51,7 @@
 static void nokia_abis_nm_queue_send_next(struct gsm_bts *bts);
 static void reset_timer_cb(void *_bts);
 static int abis_nm_reset(struct gsm_bts *bts, uint16_t ref);
-static int dump_elements(uint8_t * data, int len);
+static int dump_elements(uint8_t * data, int len) __attribute__((unused));
 
 static void bootstrap_om_bts(struct gsm_bts *bts)
 {
@@ -1307,7 +1307,7 @@
 	uint8_t ub;
 	int idx = 0;
 	int found = 0;
-	int constructed;
+	int constructed __attribute__((unused));
 	uint16_t id_value;
 
 	for (;;) {
diff --git a/openbsc/src/libbsc/handover_logic.c b/openbsc/src/libbsc/handover_logic.c
index 711c260..5ce3301 100644
--- a/openbsc/src/libbsc/handover_logic.c
+++ b/openbsc/src/libbsc/handover_logic.c
@@ -194,7 +194,6 @@
 static int ho_chan_activ_ack(struct gsm_lchan *new_lchan)
 {
 	struct bsc_handover *ho;
-	int rc;
 
 	/* we need to check if this channel activation is related to
 	 * a handover at all (and if, which particular handover) */
@@ -207,7 +206,7 @@
 	/* we can now send the 04.08 HANDOVER COMMAND to the MS
 	 * using the old lchan */
 
-	rc = gsm48_send_ho_cmd(ho->old_lchan, new_lchan, 0, ho->ho_ref);
+	gsm48_send_ho_cmd(ho->old_lchan, new_lchan, 0, ho->ho_ref);
 
 	/* start T3103.  We can continue either with T3103 expiration,
 	 * 04.08 HANDOVER COMPLETE or 04.08 HANDOVER FAIL */
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 463376d..9816174 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -518,7 +518,6 @@
 	struct gsm_bts *bts = conn->bts;
 	uint8_t mi_type;
 	char mi_string[GSM48_MI_SIZE];
-	int rc;
 
  	lu = (struct gsm48_loc_upd_req *) gh->data;
 
@@ -562,7 +561,7 @@
 	case GSM_MI_TYPE_IMSI:
 		DEBUGPC(DMM, "\n");
 		/* we always want the IMEI, too */
-		rc = mm_tx_identity_req(conn, GSM_MI_TYPE_IMEI);
+		mm_tx_identity_req(conn, GSM_MI_TYPE_IMEI);
 		conn->loc_operation->waiting_for_imei = 1;
 
 		/* look up subscriber based on IMSI, create if not found */
@@ -578,11 +577,11 @@
 					    tmsi_from_string(mi_string));
 		if (!subscr) {
 			/* send IDENTITY REQUEST message to get IMSI */
-			rc = mm_tx_identity_req(conn, GSM_MI_TYPE_IMSI);
+			mm_tx_identity_req(conn, GSM_MI_TYPE_IMSI);
 			conn->loc_operation->waiting_for_imsi = 1;
 		}
 		/* we always want the IMEI, too */
-		rc = mm_tx_identity_req(conn, GSM_MI_TYPE_IMEI);
+		mm_tx_identity_req(conn, GSM_MI_TYPE_IMEI);
 		conn->loc_operation->waiting_for_imei = 1;
 		break;
 	case GSM_MI_TYPE_IMEI:
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index 4c0862a..4dd172b 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -119,8 +119,7 @@
 	/* Call back whatever was in progress (if anything) ... */
 	cb = conn->sec_operation->cb;
 	if (cb) {
-		int rc;
-		rc = cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED,
+		cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_SUCCEEDED,
 			NULL, conn, conn->sec_operation->cb_data);
 
 	}