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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ?=
 
-- 
2.48.1





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux