mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
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:
@@ -144,10 +144,10 @@ struct telnet_dev_s
|
||||
sem_t td_exclsem; /* Enforces mutually exclusive access */
|
||||
sem_t td_iosem; /* I/O thread will notify that data is available */
|
||||
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_crefs; /* The number of open references to the session */
|
||||
uint8_t td_minor; /* Minor device number */
|
||||
uint16_t td_pending; /* Number of valid, pending bytes in the rxbuffer */
|
||||
#ifdef CONFIG_TELNET_SUPPORT_NAWS
|
||||
uint16_t td_rows; /* Number of NAWS rows */
|
||||
uint16_t td_cols; /* Number of NAWS cols */
|
||||
|
||||
Reference in New Issue
Block a user