/* Allocate at maximum 100 MiB of the stack to raise the stack overflow */
#define STACK_OVERFLOW_MAX_SIZE (100 * 1024 * 1024)
-#define PUTS(fd, str) _Py_write_noraise(fd, str, strlen(str))
+#define PUTS(fd, str) (void)_Py_write_noraise(fd, str, strlen(str))
// clang uses __attribute__((no_sanitize("undefined")))
/* Timeout => dump traceback */
assert(st == PY_LOCK_FAILURE);
- _Py_write_noraise(thread.fd, thread.header, (int)thread.header_len);
+ (void)_Py_write_noraise(thread.fd, thread.header, (int)thread.header_len);
errmsg = _Py_DumpTracebackThreads(thread.fd, thread.interp, NULL);
ok = (errmsg == NULL);
#define OFF(x) offsetof(PyTracebackObject, x)
-#define PUTS(fd, str) _Py_write_noraise(fd, str, (int)strlen(str))
+#define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str))
#define MAX_STRING_LENGTH 500
#define MAX_FRAME_DEPTH 100
#define MAX_NTHREADS 100
value /= 10;
} while (value);
- _Py_write_noraise(fd, ptr, end - ptr);
+ (void)_Py_write_noraise(fd, ptr, end - ptr);
}
/* Format an integer as hexadecimal with width digits into fd file descriptor.
value >>= 4;
} while ((end - ptr) < width || value);
- _Py_write_noraise(fd, ptr, end - ptr);
+ (void)_Py_write_noraise(fd, ptr, end - ptr);
}
void
}
if (!need_escape) {
// The string can be written with a single write() syscall
- _Py_write_noraise(fd, str, size);
+ (void)_Py_write_noraise(fd, str, size);
goto done;
}
}
if (' ' <= ch && ch <= 126) {
/* printable ASCII character */
char c = (char)ch;
- _Py_write_noraise(fd, &c, 1);
+ (void)_Py_write_noraise(fd, &c, 1);
}
else if (ch <= 0xff) {
PUTS(fd, "\\x");
}
-#define PUTS(fd, str) _Py_write_noraise(fd, str, (int)strlen(str))
+#define PUTS(fd, str) (void)_Py_write_noraise(fd, str, (int)strlen(str))
static void
_PyMem_DumpFrame(int fd, frame_t * frame)