aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-21 11:20:07 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-21 11:20:07 +0100
commit70ff72d5f45a85785280391cf7375eebea6ef31c (patch)
treee91f0fdce0485e2d92686e31ac26debfcea0a340
parent1570b9f38b70184647b4f759df5701e0cf213c4d (diff)
fix various compilation warnings all over the code
-rw-r--r--src/diag_dpl.h2
-rw-r--r--src/diag_log_wcdma.c10
-rw-r--r--src/diag_msg.c8
-rw-r--r--src/osmo-qcdiag-log.c1
-rw-r--r--src/protocol/diag_log_gsm.h2
5 files changed, 12 insertions, 11 deletions
diff --git a/src/diag_dpl.h b/src/diag_dpl.h
index 2d67671..f09dced 100644
--- a/src/diag_dpl.h
+++ b/src/diag_dpl.h
@@ -9,3 +9,5 @@ int diag_dpl_get_if_desc(struct diag_instance *di, uint8_t iface_id);
int diag_dpl_set_if_log(struct diag_instance *di, uint8_t iface_id,
struct dpl_iid iid, uint32_t link_type);
+
+int diag_dpl_get_sup_if(struct diag_instance *di);
diff --git a/src/diag_log_wcdma.c b/src/diag_log_wcdma.c
index 858e857..a1e330a 100644
--- a/src/diag_log_wcdma.c
+++ b/src/diag_log_wcdma.c
@@ -6,7 +6,7 @@
#include "protocol/diag_log_gsm.h"
#include "protocol/diag_log_wcdma.h"
-static const struct value_string rrc_states[] = {
+const struct value_string rrc_states[] = {
{ DIAG_UMTS_RRC_STATE_DISCONNECTED, "DISCONNETED" },
{ DIAG_UMTS_RRC_STATE_CONNETING, "CONNECTING" },
{ DIAG_UMTS_RRC_STATE_CELL_FACH, "CELL_FACH" },
@@ -16,7 +16,7 @@ static const struct value_string rrc_states[] = {
{ 0, NULL }
};
-static const struct value_string rrc_procedures[] = {
+const struct value_string rrc_procedures[] = {
{ DIAG_UMTS_RRC_PROC_CSP, "Cell Selection" },
{ DIAG_UMTS_RRC_PROC_SIB, "SIB Processing" },
{ DIAG_UMTS_RRC_PROC_PG2, "Paging Type 2" },
@@ -50,7 +50,7 @@ static const struct value_string rrc_procedures[] = {
{ 0, NULL }
};
-static const struct value_string rrc_fail_causes[] = {
+const struct value_string rrc_fail_causes[] = {
{ DIAG_UMTS_RRC_FAIL_CFG_UNSUP, "Configuration Unsupported" },
{ DIAG_UMTS_RRC_FAIL_PHY_CHAN_FAIL, "Physical Channel Failure" },
{ DIAG_UMTS_RRC_FAIL_INCOMP_SIM_RECONF, "Incompatible Simultaneous Reconfig" },
@@ -63,7 +63,7 @@ static const struct value_string rrc_fail_causes[] = {
{ 0, NULL }
};
-static const struct value_string rrc_prot_errs[] = {
+const struct value_string rrc_prot_errs[] = {
{ DIAG_UMTS_RRC_PERR_ASN1_ENC_ERR, "ASN.1 violation / encoding error" },
{ DIAG_UMTS_RRC_PERR_BAD_MSG_TYPE, "Not existing or not implemented message type" },
{ DIAG_UMTS_RRC_PERR_IMCOMP_RX_STATE, "Message incompatible with Rx state" },
@@ -73,7 +73,7 @@ static const struct value_string rrc_prot_errs[] = {
{ 0, NULL }
};
-static const struct value_string rrc_chan_types[] = {
+const struct value_string rrc_chan_types[] = {
{ DIAG_UMTS_RRC_CHT_UL_CCCH, "CCCH(Uplink)" },
{ DIAG_UMTS_RRC_CHT_UL_DCCH, "DCCH(Uplink)" },
{ DIAG_UMTS_RRC_CHT_DL_CCCH, "CCCH(Downlink)" },
diff --git a/src/diag_msg.c b/src/diag_msg.c
index 82c80bf..e96ad7a 100644
--- a/src/diag_msg.c
+++ b/src/diag_msg.c
@@ -81,10 +81,10 @@ int diag_msg_config_set_rt_mask(struct diag_instance *di, uint16_t ssid, uint32_
/* handler for EXT MSG */
static void diag_rx_ext_msg_f(struct diag_instance *di, struct msgb *msgb)
{
- const uint8_t *data = msgb_data(msgb);
+ uint8_t *data = msgb_data(msgb);
const size_t len = msgb_length(msgb);
- const struct ext_log_msg *msg;
- const char *file = NULL, *fmt;
+ struct ext_log_msg *msg;
+ char *file = NULL, *fmt;
unsigned int num_args;
if (len < sizeof(struct ext_log_msg)) {
@@ -94,7 +94,7 @@ static void diag_rx_ext_msg_f(struct diag_instance *di, struct msgb *msgb)
msg = (struct ext_log_msg *) data;
num_args = msg->hdr.num_args;
- fmt = (const char *) msg->params + num_args*sizeof(msg->params[0]);
+ fmt = (char *) msg->params + num_args*sizeof(msg->params[0]);
file = fmt + strlen(fmt) + 1;
printf("MSG(%u|%u|%s:%u): ", osmo_load16le(&msg->subsys_id),
diff --git a/src/osmo-qcdiag-log.c b/src/osmo-qcdiag-log.c
index 33b26ba..5d8461d 100644
--- a/src/osmo-qcdiag-log.c
+++ b/src/osmo-qcdiag-log.c
@@ -145,7 +145,6 @@ int main(int argc, char **argv)
{
struct diag_instance di;
int i;
- int rc;
if (argc < 2) {
printf("Invoke with %s PATH_TO_SERIAL\n",
diff --git a/src/protocol/diag_log_gsm.h b/src/protocol/diag_log_gsm.h
index 5492160..378472f 100644
--- a/src/protocol/diag_log_gsm.h
+++ b/src/protocol/diag_log_gsm.h
@@ -325,7 +325,7 @@ enum diag_gsm_l2_event {
DIAG_L2_EV_UA_SENT,
DIAG_L2_EV_FORCED_SUSPEND_REQ,
};
-const struct value_string diag_gsm_l2_event_vals[27];
+const struct value_string diag_gsm_l2_event_vals[28];
struct diag_gsm_l2_state {
uint8_t sapi;