diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-11-23 22:13:59 +0100 | 
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-11-23 22:13:59 +0100 | 
| commit | 061e3a81d6cbaca4130761e7c3e02afbc23b61d7 (patch) | |
| tree | 1f250dd96c8b3d201f69d6011bc1d267735937d0 | |
| parent | draft of PASSPHRASE_MOVE option implementation (diff) | |
| download | libpassphrase-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.c | 7 | 
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; | 
