1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Silence compiler warnings

- Comparisons between signed and unsigned
- Unused parameter

produced by gcc -Wall -Wextra
This commit is contained in:
Nick Patavalis
2018-02-09 19:00:56 +02:00
parent 399d7f9480
commit 6d8bf34e9f
3 changed files with 7 additions and 3 deletions

View File

@ -1558,6 +1558,8 @@ loop(void)
void
deadly_handler(int signum)
{
(void)signum; /* silence unused warning */
if ( ! sig_exit ) {
sig_exit = 1;
kill(0, SIGTERM);

2
term.c
View File

@ -244,7 +244,7 @@ struct baud_codes {
#endif /* of HIGH_BAUD */
};
#define BAUD_TABLE_SZ (sizeof(baud_table) / sizeof(baud_table[0]))
#define BAUD_TABLE_SZ ((int)(sizeof(baud_table) / sizeof(baud_table[0])))
int
term_baud_up (int baud)

6
term.h
View File

@ -167,7 +167,8 @@ enum parity_e {
P_EVEN,
P_ODD,
P_MARK,
P_SPACE
P_SPACE,
P_ERROR = -1
};
/*
@ -184,7 +185,8 @@ enum flowcntrl_e {
FC_NONE = 0,
FC_RTSCTS,
FC_XONXOFF,
FC_OTHER
FC_OTHER,
FC_ERROR = -1
};
/*