Skip to content

Commit 6eb3adf

Browse files
committed
Merge branch 'mw/maint-gcc-warns-unused-write' into maint
* mw/maint-gcc-warns-unused-write: run-command.c: fix build warnings on Ubuntu
2 parents 990169b + 90ff12a commit 6eb3adf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

run-command.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,21 @@ static int child_notifier = -1;
6767

6868
static void notify_parent(void)
6969
{
70-
write(child_notifier, "", 1);
70+
ssize_t unused;
71+
unused = write(child_notifier, "", 1);
7172
}
7273

7374
static NORETURN void die_child(const char *err, va_list params)
7475
{
7576
char msg[4096];
77+
ssize_t unused;
7678
int len = vsnprintf(msg, sizeof(msg), err, params);
7779
if (len > sizeof(msg))
7880
len = sizeof(msg);
7981

80-
write(child_err, "fatal: ", 7);
81-
write(child_err, msg, len);
82-
write(child_err, "\n", 1);
82+
unused = write(child_err, "fatal: ", 7);
83+
unused = write(child_err, msg, len);
84+
unused = write(child_err, "\n", 1);
8385
exit(128);
8486
}
8587

0 commit comments

Comments
 (0)