Skip to content

Commit

Permalink
Shut up some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 12, 2016
1 parent 82e2a07 commit 816d3e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libmain/stack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx)
if (diff < 0) diff = -diff;
if (diff < 4096) {
char msg[] = "error: stack overflow (possible infinite recursion)\n";
(void) write(2, msg, strlen(msg));
[[gnu::unused]] int res = write(2, msg, strlen(msg));
_exit(1); // maybe abort instead?
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/local-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ LocalStore::LocalStore(const Params & params)
#endif
if (res == -1) {
writeFull(fd.get(), string(settings.reservedSize, 'X'));
ftruncate(fd.get(), settings.reservedSize);
[[gnu::unused]] auto res2 = ftruncate(fd.get(), settings.reservedSize);
}
}
} catch (SysError & e) { /* don't care about errors */
Expand Down

0 comments on commit 816d3e5

Please sign in to comment.