mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-24 09:18:33 +03:00
firmware: fix various compiler warnings
This commit is contained in:
@@ -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 */
|
/* update simtrace header msg_len and submit USB buffer */
|
||||||
void usb_buf_upd_len_and_submit(struct msgb *msg)
|
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);
|
sh->msg_len = msgb_length(msg);
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
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))
|
if (msgb_l2len(msg) < sizeof(*mr))
|
||||||
return -1;
|
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)
|
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))
|
if (msgb_l2len(msg) < sizeof(*mss))
|
||||||
return -1;
|
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 */
|
/* handle a single USB command as received from the USB host */
|
||||||
static void dispatch_usb_command(struct msgb *msg, struct cardem_inst *ci)
|
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)) {
|
if (msgb_length(msg) < sizeof(*sh)) {
|
||||||
/* FIXME: Error */
|
/* FIXME: Error */
|
||||||
|
|||||||
Reference in New Issue
Block a user