netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nai-Chen(Simone) Cheng" <bleach1827@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] selftests/net: fix unused return value warnings in ksft.h
Date: Wed, 10 Sep 2025 19:16:13 +0800	[thread overview]
Message-ID: <270488a6-ec6b-4b38-aa30-b5c9e08cdd18@gmail.com> (raw)
In-Reply-To: <20250909162551.5224a3dc@kernel.org>


Hi Jakub,

On 2025-09-10 07:25, Jakub Kicinski wrote:
> Sounds good!

I tried the direct void casting approach, but it still generates 
warnings with GCC 14.2.0:
     (void)write(fd, msg, sizeof(msg));
     still shows: warning: ignoring return value of 'write'...

After further researching, I found this appears to be a known GCC/glibc 
issue dating back to 2015 where direct void casting doesn't work for 
functions with __warn_unused_result__. [1] Since this is a long-standing 
toolchain issue and direct void casting won't suppress warning, I think 
you can skip this patch. Thank you!

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Best Regards,
Nai-Chen Cheng

      reply	other threads:[~2025-09-10 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06 15:59 [PATCH] selftests/net: fix unused return value warnings in ksft.h Nai-Chen Cheng
2025-09-09  1:20 ` Jakub Kicinski
2025-09-09 10:00   ` Nai-Chen(Simone) Cheng
2025-09-09 23:25     ` Jakub Kicinski
2025-09-10 11:16       ` Nai-Chen(Simone) Cheng [this message]

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=270488a6-ec6b-4b38-aa30-b5c9e08cdd18@gmail.com \
    --to=bleach1827@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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).