aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-10 22:51:30 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-10 23:20:50 +0200
commitb91f6ad8481bf0a2fe54467e5930e1735a8f3b6b (patch)
treee92ce19412b9306675a79a076682ba246eef8864
parent9f38dddfccbbfc731e3430bf1865d999256a2e31 (diff)
firmware: fix various compiler warnings
-rw-r--r--firmware/libcommon/source/card_emu.c2
-rw-r--r--firmware/libcommon/source/mode_cardemu.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c
index ed3aa99..98b08d7 100644
--- a/firmware/libcommon/source/card_emu.c
+++ b/firmware/libcommon/source/card_emu.c
@@ -165,7 +165,7 @@ static void set_pts_state(struct card_handle *ch, enum pts_state new_ptss);
/* update simtrace header msg_len and submit USB buffer */
void usb_buf_upd_len_and_submit(struct msgb *msg)
{
- struct simtrace_msg_hdr *sh = msg->l1h;
+ struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *) msg->l1h;
sh->msg_len = msgb_length(msg);
diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c
index 4f1c3dd..3b6236d 100644
--- a/firmware/libcommon/source/mode_cardemu.c
+++ b/firmware/libcommon/source/mode_cardemu.c
@@ -500,7 +500,7 @@ static void dispatch_usb_command_cardem(struct msgb *msg, struct cardem_inst *ci
static int usb_command_modem_reset(struct msgb *msg, struct cardem_inst *ci)
{
- struct st_modem_reset *mr = msg->l2h;
+ struct st_modem_reset *mr = (struct st_modem_reset *) msg->l2h;
if (msgb_l2len(msg) < sizeof(*mr))
return -1;
@@ -524,7 +524,7 @@ static int usb_command_modem_reset(struct msgb *msg, struct cardem_inst *ci)
static int usb_command_sim_select(struct msgb *msg, struct cardem_inst *ci)
{
- struct st_modem_sim_select *mss = msg->l2h;
+ struct st_modem_sim_select *mss = (struct st_modem_sim_select *) msg->l2h;
if (msgb_l2len(msg) < sizeof(*mss))
return -1;
@@ -561,7 +561,7 @@ static void dispatch_usb_command_modem(struct msgb *msg, struct cardem_inst *ci)
/* handle a single USB command as received from the USB host */
static void dispatch_usb_command(struct msgb *msg, struct cardem_inst *ci)
{
- struct simtrace_msg_hdr *sh = msg->l1h;
+ struct simtrace_msg_hdr *sh = (struct simtrace_msg_hdr *) msg->l1h;
if (msgb_length(msg) < sizeof(*sh)) {
/* FIXME: Error */