mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 08:52:01 +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:
@@ -31,8 +31,6 @@
|
|||||||
|
|
||||||
#include <fixedmath.h>
|
#include <fixedmath.h>
|
||||||
|
|
||||||
#include <logging/nxscope/nxscope.h>
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@@ -1120,7 +1120,7 @@ int nxscope_recv(FAR struct nxscope_s *s)
|
|||||||
|
|
||||||
/* Handle frame */
|
/* 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)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
_err("ERROR: nxscope_recv_handle failed %d\n", ret);
|
_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 nxscope_chan_all_en(FAR struct nxscope_s *s, bool en)
|
||||||
{
|
{
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
int i = 0;
|
uint8_t i = 0;
|
||||||
|
|
||||||
DEBUGASSERT(s);
|
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)
|
if (hdr->sof != NXSCOPE_HDR_SOF)
|
||||||
{
|
{
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
Reference in New Issue
Block a user