tty: use __unused annotation instead to silence warnings
This commit is contained in:
parent
ace81143fd
commit
214cb70c1a
@ -328,15 +328,13 @@ ttyinq_write(struct ttyinq *ti, const void *buf, size_t nbytes, int quote)
|
||||
int
|
||||
ttyinq_write_nofrag(struct ttyinq *ti, const void *buf, size_t nbytes, int quote)
|
||||
{
|
||||
#ifdef INVARIANTS
|
||||
size_t ret;
|
||||
#endif
|
||||
size_t ret __unused;
|
||||
|
||||
if (ttyinq_bytesleft(ti) < nbytes)
|
||||
return (-1);
|
||||
|
||||
/* We should always be able to write it back. */
|
||||
DBGSET(ret, ttyinq_write(ti, buf, nbytes, quote));
|
||||
ret = ttyinq_write(ti, buf, nbytes, quote);
|
||||
MPASS(ret == nbytes);
|
||||
|
||||
return (0);
|
||||
|
@ -324,15 +324,13 @@ ttyoutq_write(struct ttyoutq *to, const void *buf, size_t nbytes)
|
||||
int
|
||||
ttyoutq_write_nofrag(struct ttyoutq *to, const void *buf, size_t nbytes)
|
||||
{
|
||||
#ifdef INVARIANTS
|
||||
size_t ret;
|
||||
#endif
|
||||
size_t ret __unused;
|
||||
|
||||
if (ttyoutq_bytesleft(to) < nbytes)
|
||||
return (-1);
|
||||
|
||||
/* We should always be able to write it back. */
|
||||
DBGSET(ret, ttyoutq_write(to, buf, nbytes));
|
||||
ret = ttyoutq_write(to, buf, nbytes);
|
||||
MPASS(ret == nbytes);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user