Fixed compiler warnings.

This commit is contained in:
Fotis Panagiotopoulos 2022-08-22 16:17:00 +03:00 • committed by Xiang Xiao
parent d1cbbcdb41
commit 0cdb2cfa48
21 changed files with 128 additions and 18 deletions

View file

@ -67,7 +67,9 @@ struct cmdhist_s
/* <esc>[K is the VT100 command erases to the end of the line. */
#ifdef CONFIG_READLINE_ECHO
static const char g_erasetoeol[] = VT100_CLEAREOL;
#endif
#ifdef CONFIG_READLINE_TABCOMPLETION
/* Prompt string to present at the beginning of the line */
@ -280,13 +282,13 @@ static void tab_completion(FAR struct rl_common_s *vtbl, char *buf,
RL_PUTC(vtbl, ' ');
RL_PUTC(vtbl, ' ');
for (j = 0; j < strlen(name); j++)
for (j = 0; j < (int)strlen(name); j++)
{
/* Removing characters that aren't common to all the
* matches.
*/
if (j < sizeof(tmp_name) && name[j] != tmp_name[j])
if (j < (int)sizeof(tmp_name) && name[j] != tmp_name[j])
{
tmp_name[j] = '\0';
}
@ -341,7 +343,7 @@ static void tab_completion(FAR struct rl_common_s *vtbl, char *buf,
if (g_readline_prompt != NULL)
{
for (i = 0; i < strlen(g_readline_prompt); i++)
for (i = 0; i < (int)strlen(g_readline_prompt); i++)
{
RL_PUTC(vtbl, g_readline_prompt[i]);
}

View file

@ -188,6 +188,8 @@ static void readline_write(FAR struct rl_common_s *vtbl,
ssize_t readline_fd(FAR char *buf, int buflen, int infd, int outfd)
{
UNUSED(outfd);
struct readline_s vtbl;
/* Set up the vtbl structure */