aristanetworks / bst

A one-stop shop for process isolation
MIT License
99 stars 9 forks source link

misc: fix warning about ignored `write` return val #23

Closed wwade closed 4 years ago

wwade commented 4 years ago

It doesn't seem like it'll ever do a short write here, so assert seemed like the best way to use the return value.

outer.c: In function ‘outer_helper_spawn’:
outer.c:294:2: warning: ignoring return value of ‘write’,
               declared with attribute warn_unused_result [-Wunused-result]
  294 |  write(pipefds_in[1], &ok, sizeof (ok));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~