From 95b10c62caedc943b4686807eb4979b0b0de4c57 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 15 Jan 2017 17:07:09 +0100 Subject: fix various other compiler warnings --- src/target/firmware/calypso/dsp.c | 4 ++-- src/target/firmware/flash/cfi_flash.c | 2 +- src/target/firmware/layer1/prim_pm.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/target/firmware/calypso/dsp.c b/src/target/firmware/calypso/dsp.c index 1daecb2d..c37ca829 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 b8d10b6e..974165d1 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 1630600a..5c8c4914 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; -- cgit v1.2.3