diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-03-07 15:25:48 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-03-13 08:08:50 +0100 |
commit | 30e0e36b9e6098403ac405c5e9dc65ef7ddef6bd (patch) | |
tree | b76225f6e276e6f69523a6c3d62bf29c990e3fee | |
parent | 2c74baa28e49deab88b31e3f8e43a3b44282eb83 (diff) |
HACK: Fix of several compiler warningsjolly/testing
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 9 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_llc.c | 8 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_sndcp.c | 2 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_sndcp_vty.c | 2 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 4 | ||||
-rw-r--r-- | openbsc/src/libbsc/abis_nm.c | 4 | ||||
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 3 |
7 files changed, 26 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index f7a5cde00..1f4d22c0f 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -347,7 +347,10 @@ static int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm) struct msgb *msg = gsm48_msgb_alloc(); struct gsm48_hdr *gh; struct gsm48_attach_ack *aa; - uint8_t *ptsig, *mid; + uint8_t *mid; +#if 0 + uint8_t *ptsig; +#endif DEBUGP(DMM, "<- GPRS ATTACH ACCEPT (new P-TMSI=0x%08x)\n", mm->p_tmsi); @@ -454,6 +457,7 @@ static int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type) return gsm48_gmm_sendmsg(msg, 1, mm); } +#if 0 /* Section 9.4.9: Authentication and Ciphering Request */ static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, uint8_t *rand, uint8_t key_seq, uint8_t algo) @@ -513,6 +517,7 @@ static int gsm48_tx_gmm_auth_ciph_rej(struct sgsn_mm_ctx *mm) return gsm48_gmm_sendmsg(msg, 0, mm); } +#endif /* Section 9.4.10: Authentication and Ciphering Response */ static int gsm48_rx_gmm_auth_ciph_resp(struct sgsn_mm_ctx *ctx, @@ -1166,6 +1171,7 @@ static void pdpctx_timer_start(struct sgsn_pdp_ctx *pdp, unsigned int T, } +#if 0 static void msgb_put_pdp_addr_ipv4(struct msgb *msg, uint32_t ipaddr) { uint8_t v[6]; @@ -1186,6 +1192,7 @@ static void msgb_put_pdp_addr_ppp(struct msgb *msg) msgb_tlv_put(msg, GSM48_IE_GSM_PDP_ADDR, sizeof(v), v); } +#endif /* Section 9.5.2: Ativate PDP Context Accept */ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp) diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index e2d3160d0..56caa4748 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -308,6 +308,7 @@ static int gprs_llc_fcs(uint8_t *data, unsigned int len) return fcs_calc; } +#if 0 static void t200_expired(void *data) { struct gprs_llc_lle *lle = data; @@ -330,6 +331,8 @@ static void t200_expired(void *data) /* FIXME: re-start T200 */ lle->retrans_ctr++; break; + default: + ; } } @@ -344,6 +347,7 @@ static void t201_expired(void *data) lle->retrans_ctr++; } } +#endif int gprs_llc_tx_u(struct msgb *msg, uint8_t sapi, int command, enum gprs_llc_u_cmd u_cmd, int pf_bit) @@ -620,6 +624,8 @@ static int gprs_llc_hdr_rx(struct gprs_llc_hdr_parsed *gph, if ((gph->seq_tx + 1) / 512) lle->oc_ui_recv += 512; break; + default: + ; } return 0; @@ -788,7 +794,9 @@ static int gprs_llc_hdr_parse(struct gprs_llc_hdr_parsed *ghp, /* receive an incoming LLC PDU (BSSGP-UL-UNITDATA-IND, 7.2.4.2) */ int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv) { +#if 0 struct bssgp_ud_hdr *udh = (struct bssgp_ud_hdr *) msgb_bssgph(msg); +#endif struct gprs_llc_hdr *lh = (struct gprs_llc_hdr *) msgb_llch(msg); struct gprs_llc_hdr_parsed llhp; struct gprs_llc_lle *lle; diff --git a/openbsc/src/gprs/gprs_sndcp.c b/openbsc/src/gprs/gprs_sndcp.c index 853f8dbc9..e901ceb96 100644 --- a/openbsc/src/gprs/gprs_sndcp.c +++ b/openbsc/src/gprs/gprs_sndcp.c @@ -561,6 +561,7 @@ int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, return sgsn_rx_sndcp_ud_ind(&sne->ra_id, lle->llme->tlli, sne->nsapi, msg, npdu_len, npdu); } +#if 0 /* Section 5.1.2.1 LL-RESET.ind */ static int sndcp_ll_reset_ind(struct gprs_sndcp_entity *se) { @@ -577,7 +578,6 @@ static int sndcp_ll_status_ind() return 0; } -#if 0 static struct sndcp_state_list {{ uint32_t states; unsigned int type; diff --git a/openbsc/src/gprs/gprs_sndcp_vty.c b/openbsc/src/gprs/gprs_sndcp_vty.c index 28fdc635b..deeef071a 100644 --- a/openbsc/src/gprs/gprs_sndcp_vty.c +++ b/openbsc/src/gprs/gprs_sndcp_vty.c @@ -43,8 +43,6 @@ static void vty_dump_sne(struct vty *vty, struct gprs_sndcp_entity *sne) { - unsigned int i; - vty_out(vty, " TLLI %08x SAPI=%u NSAPI=%u:%s", sne->lle->llme->tlli, sne->lle->sapi, sne->nsapi, VTY_NEWLINE); vty_out(vty, " Defrag: npdu=%u highest_seg=%u seg_have=0x%08x tot_len=%u%s", diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 9d42648a4..040e1d713 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -55,6 +55,10 @@ #include "../../bscconfig.h" +/* FIXME: put into seperate header file */ +int gprs_sndcp_vty_init(void); +int sgsn_gtp_init(struct sgsn_instance *sgi); + /* this is here for the vty... it will never be called */ void subscr_put() { abort(); } diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index f491a0c20..4b5e42042 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -1742,12 +1742,14 @@ static int __simple_cmd(struct gsm_bts *bts, uint8_t msg_type) int abis_nm_opstart(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1, uint8_t i2) { struct abis_om_hdr *oh; + struct abis_om_fom_hdr *foh; struct msgb *msg = nm_msgb_alloc(); oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE); + foh = (struct abis_om_fom_hdr *) oh->data; fill_om_fom_hdr(oh, 0, NM_MT_OPSTART, obj_class, i0, i1, i2); - abis_nm_debugp_foh(DNM, (struct abis_om_fom_hdr *) oh->data); + abis_nm_debugp_foh(DNM, foh); DEBUGPC(DNM, "Sending OPSTART\n"); return abis_nm_sendmsg(bts, msg); diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 81003ddbd..22a0543e1 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -90,7 +90,8 @@ static uint8_t lchan_to_chosen_channel(struct gsm_lchan *lchan) channel = 0x9; break; case GSM_LCHAN_UNKNOWN: - LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %p\n", lchan); + default: + LOGP(DMSC, LOGL_ERROR, "Unknown lchan type: %u\n", lchan->type); break; } |