Skip to content

Commit 305181e

Browse files
committed
srv: avoid a build warning on non-Linux systems
Due to an ifdef __linux__ we can have an unused variable "tio" on other systems that produces this warning: CC src/bt.o src/bt.c:851:17: warning: unused variable 'tio' [-Wunused-variable] struct termios tio; ^ 1 warning generated. LD bin/bt Let's enclose it in the same ifdef.
1 parent e78d6c2 commit 305181e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,9 @@ static int serial_port_cmp(const void *a, const void *b)
848848
*/
849849
int file_isatty(const char *devname)
850850
{
851+
#ifdef __linux__
851852
struct termios tio;
853+
#endif
852854
struct winsize ws;
853855
struct stat st;
854856
int ret = 0;

0 commit comments

Comments
 (0)