Fix warn_unused_result on write/read in nbd and ublk

This commit is contained in:
Vitaliy Filippov
2025-09-24 02:07:58 +03:00
parent 2ef80bf0b8
commit e1715c33bb
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -335,7 +335,7 @@ help:
{
daemonize_reopen_stdio();
int ok = 0;
write(notifyfd[1], &ok, sizeof(ok));
(void)write(notifyfd[1], &ok, sizeof(ok));
close(notifyfd[1]);
}
else
@@ -377,7 +377,7 @@ help:
// Parent - check status
close(notifyfd[1]);
int child_errno = 1;
read(notifyfd[0], &child_errno, sizeof(child_errno));
(void)read(notifyfd[0], &child_errno, sizeof(child_errno));
if (!child_errno)
printf("/dev/ublkb%d\n", ublk_dev.dev_id);
exit(child_errno);