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.
This commit is contained in:
Michael Vetter
2026-02-19 11:18:11 +01:00
parent b8eddb4e3c
commit b6a70aa47e

View File

@@ -87,7 +87,7 @@ _p_gpg_free_pubkeyid(ProfPGPPubKeyId* pubkeyid)
free(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) _p_gpg_passphrase_cb(void* hook, const char* uid_hint, const char* passphrase_info, int prev_was_bad, int fd)
{ {
if (passphrase) { 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)); gpgme_io_write(fd, passphrase_attempt, strlen(passphrase_attempt));
} }
return 0; return GPG_ERR_NO_ERROR;
} }
static void static void