Fix warnings noted in PR build checks:
net/telnet.c:1317:40: warning: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] if (priv->td_pending < CONFIG_TELNET_RXBUFFER_SIZE) ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ time/lib_localtime.c:569:32: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [33]' [-Wsizeof-array-decay] sizeof(lsp->fullname - 1) <= strlen(p) + strlen(name)) ~~~~~~~~~~~~~ ^
This commit is contained in:
parent
c3b0848284
commit
62c1389825
|
@ -144,10 +144,10 @@ struct telnet_dev_s
|
||||||
sem_t td_exclsem; /* Enforces mutually exclusive access */
|
sem_t td_exclsem; /* Enforces mutually exclusive access */
|
||||||
sem_t td_iosem; /* I/O thread will notify that data is available */
|
sem_t td_iosem; /* I/O thread will notify that data is available */
|
||||||
uint8_t td_state; /* (See telnet_state_e) */
|
uint8_t td_state; /* (See telnet_state_e) */
|
||||||
uint8_t td_pending; /* Number of valid, pending bytes in the rxbuffer */
|
|
||||||
uint8_t td_offset; /* Offset to the valid, pending bytes in the rxbuffer */
|
uint8_t td_offset; /* Offset to the valid, pending bytes in the rxbuffer */
|
||||||
uint8_t td_crefs; /* The number of open references to the session */
|
uint8_t td_crefs; /* The number of open references to the session */
|
||||||
uint8_t td_minor; /* Minor device number */
|
uint8_t td_minor; /* Minor device number */
|
||||||
|
uint16_t td_pending; /* Number of valid, pending bytes in the rxbuffer */
|
||||||
#ifdef CONFIG_TELNET_SUPPORT_NAWS
|
#ifdef CONFIG_TELNET_SUPPORT_NAWS
|
||||||
uint16_t td_rows; /* Number of NAWS rows */
|
uint16_t td_rows; /* Number of NAWS rows */
|
||||||
uint16_t td_cols; /* Number of NAWS cols */
|
uint16_t td_cols; /* Number of NAWS cols */
|
||||||
|
|
|
@ -566,7 +566,7 @@ static int tzload(FAR const char *name,
|
||||||
{
|
{
|
||||||
p = TZDIR;
|
p = TZDIR;
|
||||||
if (p == NULL ||
|
if (p == NULL ||
|
||||||
sizeof(lsp->fullname - 1) <= strlen(p) + strlen(name))
|
FILENAME_MAX <= strlen(p) + strlen(name))
|
||||||
{
|
{
|
||||||
goto oops;
|
goto oops;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue