diff options
Diffstat (limited to 'test/scopedfile.cc')
-rw-r--r-- | test/scopedfile.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/scopedfile.cc b/test/scopedfile.cc index 02af3f8..e63972e 100644 --- a/test/scopedfile.cc +++ b/test/scopedfile.cc @@ -43,7 +43,8 @@ ScopedFile::ScopedFile(const std::string& data) char templ[] = "/tmp/dg-scoped-file-XXXXXX"; // buffer for filename pimpl->fd = mkstemp(templ); pimpl->filename = templ; - write(pimpl->fd, data.data(), data.size()); + auto sz = write(pimpl->fd, data.data(), data.size()); + (void)sz; close(pimpl->fd); } |