backtrace: store result of write() in a junk var

This commit is contained in:
Alam Ed Arias 2023-09-09 16:10:42 -04:00
parent 4d21701415
commit 05223fbc6d

View file

@ -259,10 +259,10 @@ UINT8 keyboard_started = false;
#ifdef UNIXBACKTRACE
#define STDERR_WRITE(string) if (fd != -1) I_OutputMsg("%s", string)
#define CRASHLOG_WRITE(string) if (fd != -1) write(fd, string, strlen(string))
#define CRASHLOG_WRITE(string) if (fd != -1) junk = write(fd, string, strlen(string))
#define CRASHLOG_STDERR_WRITE(string) \
if (fd != -1)\
write(fd, string, strlen(string));\
junk = write(fd, string, strlen(string));\
I_OutputMsg("%s", string)
static void write_backtrace(INT32 signal)
@ -271,6 +271,7 @@ static void write_backtrace(INT32 signal)
size_t size;
time_t rawtime;
struct tm timeinfo;
ssize_t junk;
enum { BT_SIZE = 1024, STR_SIZE = 32 };
void *array[BT_SIZE];