* [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result
@ 2025-06-18 20:17 Cheng-Yang Chou
2025-06-18 20:17 ` [PATCH 1/1] Makefile: Use -Wno-error=unused-result Cheng-Yang Chou
2025-06-29 8:21 ` [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
0 siblings, 2 replies; 4+ messages in thread
From: Cheng-Yang Chou @ 2025-06-18 20:17 UTC (permalink / raw)
To: williams, jkacur; +Cc: linux-rt-users, jserv, yphbchou0911
This patch adds -Wno-error=unused-result to the Makefile to allow rt-tests
to build on glibc >= 2.41, where functions like write(), system(), and
ftruncate() are annotated with warn_unused_result. The build currently
fails due to these ignored return values being treated as fatal errors
under -Werror.
This change serves as a temporary workaround. A follow-up patch will
address proper error checking at each affected call site.
Thanks.
-chengyang
---
Cheng-Yang Chou (1):
Makefile: Use -Wno-error=unused-result
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.48.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] Makefile: Use -Wno-error=unused-result
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
2025-07-01 14:25 ` John Kacur
2025-06-29 8:21 ` [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
1 sibling, 1 reply; 4+ messages in thread
From: Cheng-Yang Chou @ 2025-06-18 20:17 UTC (permalink / raw)
To: williams, jkacur; +Cc: linux-rt-users, jserv, yphbchou0911
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Makefile: Use -Wno-error=unused-result
2025-06-18 20:17 ` [PATCH 1/1] Makefile: Use -Wno-error=unused-result Cheng-Yang Chou
@ 2025-07-01 14:25 ` John Kacur
0 siblings, 0 replies; 4+ messages in thread
From: John Kacur @ 2025-07-01 14:25 UTC (permalink / raw)
To: Cheng-Yang Chou; +Cc: williams, linux-rt-users, jserv
On Thu, 19 Jun 2025, Cheng-Yang Chou wrote:
> 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
>
>
>
Signed-off-by: John Kacur <jkacur@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result
2025-06-18 20:17 [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
2025-06-18 20:17 ` [PATCH 1/1] Makefile: Use -Wno-error=unused-result Cheng-Yang Chou
@ 2025-06-29 8:21 ` Cheng-Yang Chou
1 sibling, 0 replies; 4+ messages in thread
From: Cheng-Yang Chou @ 2025-06-29 8:21 UTC (permalink / raw)
To: williams, jkacur; +Cc: linux-rt-users, jserv
On Thu, Jun 19, 2025 at 04:17:37AM +0800, Cheng-Yang Chou wrote:
> Cheng-Yang Chou (1):
> Makefile: Use -Wno-error=unused-result
>
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Hi Clark and John,
Gentle ping.
Please let me know if any changes are needed.
Thanks.
-chengyang
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-01 14:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 20:17 [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
2025-06-18 20:17 ` [PATCH 1/1] Makefile: Use -Wno-error=unused-result Cheng-Yang Chou
2025-07-01 14:25 ` John Kacur
2025-06-29 8:21 ` [PATCH 0/1] Makefile: Temporarily suppress -Werror=unused-result Cheng-Yang Chou
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).