From 1a8216b7cd6f272253e7381bc520c65b7dd38b24 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 26 Oct 2023 03:22:01 +0800 Subject: Fix warnings for gcc 12.3 (#3286) * Silence a few gcc out of bounds warnings * Search upwards from executable for prelude directory instead of assuming depth * comment wording * Check return values of read and write * Correct path to vulkan headers in gfx * Correct diagnostic on missing file in slang-embed * Do not use absolute path to libraries in test-context.cpp --------- Co-authored-by: Yong He --- source/core/unix/slang-unix-process.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/core/unix') diff --git a/source/core/unix/slang-unix-process.cpp b/source/core/unix/slang-unix-process.cpp index 3ab113d83..ee5484fd8 100644 --- a/source/core/unix/slang-unix-process.cpp +++ b/source/core/unix/slang-unix-process.cpp @@ -516,7 +516,8 @@ static int pipeCLOEXEC(int pipefd[2]) // Signal the failure to our parent int execErr = errno; - ::write(execWatchPipe[1], &execErr, sizeof(execErr)); + if(::write(execWatchPipe[1], &execErr, sizeof(execErr))) + fprintf(stderr, "error: `exec` watch pipe write failed\n"); // NOTE! Because we have dup2 into STDERR_FILENO, this error will *not* generally appear on // the terminal but in the stderrPipe. -- cgit v1.2.3