Fixes the following warnings when building with _FORTIFY_SOURCE and optimizations enabled: ../shared/xalloc.h:49:9: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 49 | write(STDERR_FILENO, oommsg, strlen(oommsg)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ or ../compositor/main.c:427:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 427 | write(STDERR_FILENO, fail_seteuid, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 428 | strlen(fail_seteuid)); | ~~~~~~~~~~~~~~~~~~~~~ ../compositor/main.c:434:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 434 | write(STDERR_FILENO, fail_cloexec, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 435 | strlen(fail_cloexec)); | ~~~~~~~~~~~~~~~~~~~~~ ../compositor/main.c:442:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 442 | write(STDERR_FILENO, fail_exec, strlen(fail_exec)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit 8c4cdd782e17aa587bfccb6746998571ddc90dd7)dev
parent
715eb67cd8
commit
00a78294b1
Loading…
Reference in new issue