summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-15 17:07:09 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-15 19:18:38 +0100
commit95b10c62caedc943b4686807eb4979b0b0de4c57 (patch)
tree3a7bcbf055cfaa3a795847de4f1579542b5d1e5d
parent9004de39ab1e047a7d6687e68f5bad708364b09f (diff)
fix various other compiler warnings
-rw-r--r--src/target/firmware/calypso/dsp.c4
-rw-r--r--src/target/firmware/flash/cfi_flash.c2
-rw-r--r--src/target/firmware/layer1/prim_pm.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/src/target/firmware/calypso/dsp.c b/src/target/firmware/calypso/dsp.c
index 1daecb2..c37ca82 100644
--- a/src/target/firmware/calypso/dsp.c
+++ b/src/target/firmware/calypso/dsp.c
@@ -639,7 +639,7 @@ static void _dsp_dump_range(uint32_t addr, uint32_t size, int mode)
* the sercomm buffer */
delay_ms(2);
if ((addr&15)==0)
- printf("%05x : ", addr);
+ printf("%05lx : ", addr);
printf("%04hx%c", *api++, ((addr&15)==15)?'\n':' ');
addr++;
}
@@ -685,7 +685,7 @@ void dsp_dump(void)
/* Dump each range */
for (i=0; dr[i].name; i++) {
- printf("DSP dump: %s [%05x-%05x]\n", dr[i].name,
+ printf("DSP dump: %s [%05lx-%05lx]\n", dr[i].name,
dr[i].addr, dr[i].addr+dr[i].size-1);
_dsp_dump_range(dr[i].addr, dr[i].size, dr[i].mode);
}
diff --git a/src/target/firmware/flash/cfi_flash.c b/src/target/firmware/flash/cfi_flash.c
index b8d10b6..974165d 100644
--- a/src/target/firmware/flash/cfi_flash.c
+++ b/src/target/firmware/flash/cfi_flash.c
@@ -399,7 +399,7 @@ __ramtext
static int get_query(void *base_addr, struct cfi_query *query)
{
int res = 0;
- int i;
+ unsigned int i;
flash_write_cmd(base_addr, CFI_CMD_CFI);
diff --git a/src/target/firmware/layer1/prim_pm.c b/src/target/firmware/layer1/prim_pm.c
index 1630600..5c8c491 100644
--- a/src/target/firmware/layer1/prim_pm.c
+++ b/src/target/firmware/layer1/prim_pm.c
@@ -108,7 +108,7 @@ static int l1s_pm_resp(uint8_t num_meas, __unused uint8_t p2,
l1s.pm.msg = l1ctl_msgb_alloc(L1CTL_PM_CONF);
}
- pmr = msgb_put(l1s.pm.msg, sizeof(*pmr));
+ pmr = (struct l1ctl_pm_conf *) msgb_put(l1s.pm.msg, sizeof(*pmr));
pmr->band_arfcn = htons(arfcn);
/* FIXME: do this as RxLev rather than DBM8 ? */
pmr->pm[0] = dbm2rxlev(agc_inp_dbm8_by_pm(pm_level[0])/8);
@@ -125,7 +125,8 @@ static int l1s_pm_resp(uint8_t num_meas, __unused uint8_t p2,
l1s_pm_test(1, l1s.pm.range.arfcn_next);
} else {
/* we have finished, flush the msgb to L2 */
- struct l1ctl_hdr *l1h = l1s.pm.msg->l1h;
+ struct l1ctl_hdr *l1h;
+ l1h = (struct l1ctl_hdr *) l1s.pm.msg->l1h;
l1h->flags |= L1CTL_F_DONE;
l1_queue_for_l2(l1s.pm.msg);
l1s.pm.msg = NULL;