Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
spawn: fix a compiler warning (unused-variable)
  • Loading branch information
perexg committed Nov 17, 2014
1 parent 0d10db2 commit 3f7ac5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spawn.c
Expand Up @@ -101,7 +101,7 @@ spawn_pipe_write( th_pipe_t *p, const char *fmt, va_list ap )
char buf[512];

vsnprintf(buf, sizeof(buf), fmt, ap);
write(p->wr, buf, strlen(buf));
(void)write(p->wr, buf, strlen(buf));
}

void
Expand Down

1 comment on commit 3f7ac5b

@Dobrotin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/spawn.c: In function ‘spawn_pipe_write’:
src/spawn.c:104:3: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]

(void)write(p->wr, buf, strlen(buf));
cc1: all warnings being treated as errors

Please sign in to comment.