mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
logging/nxscope: fix various warnings reported by CodeChekcer
fix various warnings reported by CodeChekcer for nxscope Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
@@ -1120,7 +1120,7 @@ int nxscope_recv(FAR struct nxscope_s *s)
|
||||
|
||||
/* Handle frame */
|
||||
|
||||
ret = nxscope_recv_handle(s, frame.id, frame.dlen, frame.data);
|
||||
ret = nxscope_recv_handle(s, frame.id, (uint16_t)frame.dlen, frame.data);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: nxscope_recv_handle failed %d\n", ret);
|
||||
|
@@ -683,8 +683,8 @@ errout:
|
||||
|
||||
int nxscope_chan_all_en(FAR struct nxscope_s *s, bool en)
|
||||
{
|
||||
int ret = OK;
|
||||
int i = 0;
|
||||
int ret = OK;
|
||||
uint8_t i = 0;
|
||||
|
||||
DEBUGASSERT(s);
|
||||
|
||||
|
@@ -166,6 +166,16 @@ static int nxscope_frame_get(FAR struct nxscope_proto_s *p,
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for no header */
|
||||
|
||||
if (hdr == NULL)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
/* Check for no SOF in header */
|
||||
|
||||
if (hdr->sof != NXSCOPE_HDR_SOF)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
|
Reference in New Issue
Block a user