public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Wake Liu <wakel@google.com>, Ingo Molnar <mingo@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Cc: "Peter Zijlstra" <peterz@infradead.org>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"André Almeida" <andrealmeid@igalia.com>,
	"Wake Liu" <wakel@google.com>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kselftest: futex: Fix memset with zero size warning
Date: Thu, 20 Nov 2025 12:59:27 +0100	[thread overview]
Message-ID: <871plslxsw.ffs@tglx> (raw)
In-Reply-To: <20251119030052.315502-1-wakel@google.com>

On Wed, Nov 19 2025 at 11:00, Wake Liu wrote:
> The `FIXTURE(args)` macro defines an empty `struct _test_data_args`,
> leading to `sizeof(struct _test_data_args)` evaluating to 0. This
> caused a build error due to a compiler warning on a `memset` call
> with a zero size argument.

Where is that memset? The only possibly related one I can find in the
kselftest harness is:

        if (sizeof(foo) > 0)
           memset(foo, 0, sizeof(foo));

If your compiler complains about that, then you need to fix your
compiler and not perfectly correct code.

You again fail to provide enough information to understand what you are
trying to "fix" including the compiler version and related built
options.

Thanks,

        tglx

  parent reply	other threads:[~2025-11-20 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19  3:00 [PATCH] kselftest: futex: Fix memset with zero size warning Wake Liu
2025-11-19 15:31 ` André Almeida
2025-11-20 11:59 ` Thomas Gleixner [this message]
2025-12-24  8:41   ` [PATCH] kselftest/harness: Use helper to avoid zero-size memset warning Wake Liu
2025-12-31 20:31     ` Shuah Khan

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=871plslxsw.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=andrealmeid@igalia.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=wakel@google.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