nshlib: Fix warning reported by clang
nsh_telnetlogin.c:62:15: error: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
static void nsh_telnetecho(FAR struct console_stdio_s *pstate,
uint8_t is_use)
{
- char optbuf[4];
+ uint8_t optbuf[4];
optbuf[0] = TELNET_IAC;
optbuf[1] = (is_use == TELNET_USE_ECHO) ? TELNET_WILL : TELNET_DO;
optbuf[2] = 1;
optbuf[3] = 0;
- fputs(optbuf, pstate->cn_outstream);
+ fputs((FAR char *)optbuf, pstate->cn_outstream);
fflush(pstate->cn_outstream);
}
