diff mbox series

[1/1] Makefile: Use -Wno-error=unused-result

Message ID 20250618201738.635735-2-yphbchou0911@gmail.com
State New
Headers show
Series Makefile: Temporarily suppress -Werror=unused-result | expand

Commit Message

Cheng-Yang Chou June 18, 2025, 8:17 p.m. UTC
Since compile warnings are treated as errors, use -Wno-error=unused-result
to avoid build failures caused by ignored return values from functions
like write(), system(), and ftruncate(). This allows the build to succeed
until proper error handling can be added where appropriate.

Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 6215541..e3d02cd 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@  prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
 mandir	?= $(prefix)/share/man
 
-CFLAGS ?= -Wall -Werror -Wno-nonnull -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-error=format-truncation=
+CFLAGS ?= -Wall -Werror -Wno-nonnull -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-error=format-truncation= -Wno-error=unused-result
 CPPFLAGS += -D_GNU_SOURCE -Isrc/include
 LDFLAGS ?=