linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: williams@redhat.com, jkacur@redhat.com
Cc: linux-rt-users@vger.kernel.org, jserv@ccns.ncku.edu.tw,
	yphbchou0911@gmail.com
Subject: [PATCH 1/1] Makefile: Use -Wno-error=unused-result
Date: Thu, 19 Jun 2025 04:17:38 +0800	[thread overview]
Message-ID: <20250618201738.635735-2-yphbchou0911@gmail.com> (raw)
In-Reply-To: <20250618201738.635735-1-yphbchou0911@gmail.com>

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 --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


  reply	other threads:[~2025-06-18 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 20:17 [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
2025-06-18 20:17 ` Cheng-Yang Chou [this message]
2025-07-01 14:25   ` [PATCH 1/1] Makefile: Use -Wno-error=unused-result John Kacur
2025-06-29  8:21 ` [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250618201738.635735-2-yphbchou0911@gmail.com \
    --to=yphbchou0911@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).