Mercurial > ~mikael > mcabber > hg
diff mcabber/src/pgp.c @ 1598:a087125d8fc8
Replace libjabber with loudmouth
author | franky |
---|---|
date | Sun, 11 Oct 2009 15:38:32 +0200 |
parents | 366ef500c522 |
children | dcd5d4c75199 |
line wrap: on
line diff
--- a/mcabber/src/pgp.c Thu Oct 08 19:40:23 2009 +0200 +++ b/mcabber/src/pgp.c Sun Oct 11 15:38:32 2009 +0200 @@ -150,6 +150,9 @@ return g_strndup(p, q-p); } +// GCC ignores casts to void, thus we need to hack around that +static inline void ignore(void*x) {} + // passphrase_cb() // GPGME passphrase callback function. static gpgme_error_t passphrase_cb(void *hook, const char *uid_hint, @@ -159,7 +162,8 @@ // Abort if we do not have the password. if (!gpg.passphrase) { - write(fd, "\n", 1); + ignore((void*)write(fd, "\n", 1)); // We have an error anyway, thus it does + // not matter if we fail again. return gpg_error(GPG_ERR_CANCELED); }