[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] getpass: conditionalize variable declarations
From: |
Jonas 'Sortie' Termansen |
Subject: |
[PATCH] getpass: conditionalize variable declarations |
Date: |
Wed, 6 Aug 2014 18:17:59 +0200 |
This fixes unused variable warnings. Additionally, the struct termios may
not be defined on systems without tcsetattr and no termios header.
---
lib/getpass.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/getpass.c b/lib/getpass.c
index 43d0d59..18dc0b7 100644
--- a/lib/getpass.c
+++ b/lib/getpass.c
@@ -85,7 +85,9 @@ getpass (const char *prompt)
{
FILE *tty;
FILE *in, *out;
+# if HAVE_TCGETATTR
struct termios s, t;
+# endif
bool tty_changed = false;
static char *buf;
static size_t bufsize;
--
2.0.0
- [PATCH] getpass: conditionalize variable declarations,
Jonas 'Sortie' Termansen <=