2222#include < time.h>
2323#include < unistd.h>
2424#include < dirent.h>
25+ #include < tuple>
2526
2627#include " common/server/crash-dump.h"
2728#include " common/stats/provider.h"
@@ -49,9 +50,9 @@ double dl_time() {
4950}
5051
5152void dl_print_backtrace (void **trace, int trace_size) {
52- write (2 , " \n ------- Stack Backtrace -------\n " , 33 );
53+ std::ignore = write (2 , " \n ------- Stack Backtrace -------\n " , 33 );
5354 backtrace_symbols_fd (trace, trace_size, 2 );
54- write (2 , " -------------------------------\n " , 32 );
55+ std::ignore = write (2 , " -------------------------------\n " , 32 );
5556}
5657
5758void dl_print_backtrace () {
@@ -71,7 +72,7 @@ void dl_print_backtrace_gdb() {
7172 name_buf[res] = 0 ;
7273 int child_pid = fork ();
7374 if (child_pid < 0 ) {
74- write (2 , " Can't fork() to run gdb\n " , 24 );
75+ std::ignore = write (2 , " Can't fork() to run gdb\n " , 24 );
7576 _exit (0 );
7677 }
7778 if (!child_pid) {
@@ -83,7 +84,7 @@ void dl_print_backtrace_gdb() {
8384 waitpid (child_pid, nullptr , 0 );
8485 }
8586 } else {
86- write (2 , " can't get name of executable file to pass to gdb\n " , 49 );
87+ std::ignore = write (2 , " can't get name of executable file to pass to gdb\n " , 49 );
8788 }
8889}
8990
0 commit comments