mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-12-23 02:11:40 +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
18
gnupg.c
18
gnupg.c
|
@ -412,9 +412,12 @@ 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);
|
||||
return 0;
|
||||
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){
|
||||
|
@ -439,9 +442,12 @@ 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);
|
||||
return 0;
|
||||
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