mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
tevent:threads: fix -O3 error unused result of write
some compilers don't tolerate void-casting for warn_unused_result Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
This commit is contained in:
parent
a55ac51f5f
commit
149fa72770
@ -310,6 +310,7 @@ void tevent_thread_proxy_schedule(struct tevent_thread_proxy *tp,
|
||||
struct tevent_immediate_list *im_entry;
|
||||
int ret;
|
||||
char c;
|
||||
ssize_t written;
|
||||
|
||||
ret = pthread_mutex_lock(&tp->mutex);
|
||||
if (ret != 0) {
|
||||
@ -341,7 +342,9 @@ void tevent_thread_proxy_schedule(struct tevent_thread_proxy *tp,
|
||||
|
||||
/* And notify the dest_ev_ctx to wake up. */
|
||||
c = '\0';
|
||||
(void)write(tp->write_fd, &c, 1);
|
||||
do {
|
||||
written = write(tp->write_fd, &c, 1);
|
||||
} while (written == -1 && errno == EINTR);
|
||||
|
||||
end:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user