aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-23 22:13:59 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-23 22:13:59 +0100
commit061e3a81d6cbaca4130761e7c3e02afbc23b61d7 (patch)
tree1f250dd96c8b3d201f69d6011bc1d267735937d0 /src
parentdraft of PASSPHRASE_MOVE option implementation (diff)
downloadlibpassphrase-061e3a81d6cbaca4130761e7c3e02afbc23b61d7.tar.gz
libpassphrase-061e3a81d6cbaca4130761e7c3e02afbc23b61d7.tar.bz2
libpassphrase-061e3a81d6cbaca4130761e7c3e02afbc23b61d7.tar.xz
fix option dependent errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/passphrase.c7
1 files changed, 5 insertions, 2 deletions
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;