fix various compilation warnings all over the code

This commit is contained in:
Harald Welte 2017-01-21 11:20:07 +01:00
parent 1570b9f38b
commit 70ff72d5f4
5 changed files with 12 additions and 11 deletions

View File

@ -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);

View File

@ -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)" },

View File

@ -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),

View File

@ -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",

View File

@ -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;