Skip to content

Commit 112422b

Browse files
committed
Ignore warning for -Wunused-result in ~DropPrivilegeGuard() for GCC
1 parent 09bd0cd commit 112422b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/btop_log.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ namespace Logger {
7878
~DropPrivilegeGuard() noexcept {
7979
if (saved_euid != geteuid()) {
8080
// Silently drop error status.
81+
#pragma GCC diagnostic push
82+
#pragma GCC diagnostic ignored "-Wunused-result"
8183
seteuid(saved_euid);
84+
#pragma GCC diagnostic pop
8285
}
8386
}
8487

0 commit comments

Comments
 (0)