Fix: Unused result warning

Check the result of the write function to avoid an unused result
warning.

Pull Request: https://projects.blender.org/blender/blender/pulls/148198
This commit is contained in:
Jorn Visser
2025-10-16 15:29:03 +02:00
committed by Sybren A. Stüvel
parent 2c4ecbd536
commit 7df175c326

View File

@@ -275,7 +275,9 @@ static void print_error(const char *message)
{
char buffer[256];
size_t length = BLI_string_join(buffer, sizeof(buffer), "BLI_mmap: ", message, "\n");
write(STDERR_FILENO, buffer, length);
if (write(STDERR_FILENO, buffer, length) < 0) {
/* If writing to stderr fails, there is nowhere to write an error about that. */
}
}
static bool try_map_zeros(BLI_mmap_file *file)