mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-22 14:27:09 +00:00
fix warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
This commit is contained in:
parent
3fde6a9208
commit
db7fde633f
1 changed files with 12 additions and 6 deletions
14
gnupg.c
14
gnupg.c
|
@ -412,10 +412,13 @@ gpgme_error_t passphrase_cb (gnupg_object *intern, const char *uid_hint, const c
|
|||
return 1;
|
||||
}
|
||||
|
||||
write (fd, passphrase, strlen(passphrase));
|
||||
write (fd, "\n", 1);
|
||||
if (write (fd, passphrase, strlen(passphrase))==strlen(passphrase)
|
||||
&& write (fd, "\n", 1)==1) {
|
||||
return 0;
|
||||
}
|
||||
GNUPG_ERR("write failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
gpgme_error_t passphrase_decrypt_cb (gnupg_object *intern, const char *uid_hint, const char *passphrase_info,int last_was_bad, int fd TSRMLS_DC){
|
||||
char uid[17];
|
||||
|
@ -439,10 +442,13 @@ gpgme_error_t passphrase_decrypt_cb (gnupg_object *intern, const char *uid_hint,
|
|||
GNUPG_ERR("no passphrase set");
|
||||
return 1;
|
||||
}
|
||||
write (fd, passphrase, strlen(passphrase));
|
||||
write (fd, "\n", 1);
|
||||
if (write (fd, passphrase, strlen(passphrase))==strlen(passphrase)
|
||||
&& write (fd, "\n", 1)==1) {
|
||||
return 0;
|
||||
}
|
||||
GNUPG_ERR("write failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Reference in a new issue