From b6a70aa47ecf26d85f235a13fc587bb52a3858b0 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 19 Feb 2026 11:18:11 +0100 Subject: [PATCH] cleanup: Fix cast function type warnings in pgp.c The gpgme_set_passphrase_cb function expects a function pointer of type gpgme_passphrase_cb_t. The gpgme_passphrase_cb_t typedef specifies a function that returns gpgme_error_t so return GPG_ERR_NO_ERROR instead of 0. --- src/pgp/gpg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index 43cd65dd..2a6ef51c 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -87,7 +87,7 @@ _p_gpg_free_pubkeyid(ProfPGPPubKeyId* pubkeyid) free(pubkeyid); } -static gpgme_error_t* +static gpgme_error_t _p_gpg_passphrase_cb(void* hook, const char* uid_hint, const char* passphrase_info, int prev_was_bad, int fd) { if (passphrase) { @@ -109,7 +109,7 @@ _p_gpg_passphrase_cb(void* hook, const char* uid_hint, const char* passphrase_in gpgme_io_write(fd, passphrase_attempt, strlen(passphrase_attempt)); } - return 0; + return GPG_ERR_NO_ERROR; } static void