Fixed compiler warnings.

This commit is contained in:
Fotis Panagiotopoulos 2022-08-29 18:58:36 +03:00 committed by Xiang Xiao
parent daf9e80936
commit 1c7839c28c
2 changed files with 2 additions and 2 deletions

View File

@ -1160,7 +1160,7 @@ int nsh_extmatch_count(FAR char *name, FAR int *matches, int namelen)
defined(CONFIG_READLINE_HAVE_EXTMATCH)
FAR const char *nsh_extmatch_getname(int index)
{
DEBUGASSERT(index > 0 && index <= NUM_CMDS);
DEBUGASSERT(index > 0 && index <= (int)NUM_CMDS);
return g_cmdmap[index].cmd;
}
#endif

View File

@ -262,7 +262,7 @@ int nsh_readfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
{
/* Successful read. Make sure that the buffer is null terminated */
DEBUGASSERT(nread <= remaining);
DEBUGASSERT(nread <= (ssize_t)remaining);
ntotal += nread;
buffer[ntotal] = '\0';