From 061e3a81d6cbaca4130761e7c3e02afbc23b61d7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 23 Nov 2013 22:13:59 +0100 Subject: fix option dependent errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/passphrase.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/passphrase.c b/src/passphrase.c index 751a77b..52ce474 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -70,7 +70,7 @@ static inline char* xrealloc(char* array, size_t cur_size, size_t new_size) # elif defined(PASSPHRASE_ECHO) # define xputchar(C) putchar(C) # else -# define xputchar(C) /* be silent */ +# define xputchar(C) ({ /* be silent */ }) # endif #endif @@ -167,8 +167,11 @@ char* passphrase_read(void) if (insert) #endif { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wempty-body" if ((c & 0xC0) != 0x80) xprintf("\033[@"); +#pragma GCC diagnostic pop xputchar(c); for (i = point; i < len; i++) *(rc + i + 1) = *(rc + i); @@ -269,7 +272,7 @@ char* passphrase_read(void) } else if ((cc == -7) && point) /* left */ { - char redo = 1 + char redo = 1; xprintf("\033[D"); while (redo) redo = (*(rc + point--) & 0xC0) == 0x80; -- cgit v1.2.3-70-g09d2