From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
llvm@lists.linux.dev
Subject: Re: [PATCH v1] tools build: Fix timerfd feature detection with clang
Date: Sat, 12 Sep 2026 17:15:04 -0300 [thread overview]
Message-ID: <aqWyyC4n0XvAFvux@x2> (raw)
In-Reply-To: <20260910213907.3206529-1-irogers@google.com>
On Thu, Sep 10, 2026 at 02:39:07PM -0700, Ian Rogers wrote:
> Clang's uninitialized-const-pointer warning causes a feature test to
> fail when building perf with clang. This disables support for 'perf
> kvm stat live'. Add default initialization to new_value as a
> workaround.
>
> test-timerfd.c:15:30: error: variable 'new_value' is uninitialized when passed
> as a const pointer argument here
> [-Werror,-Wuninitialized-const-pointer]
> 15 | if (timerfd_settime(fd, 0, &new_value, NULL) != 0)
> | ^~~~~~~~~
> 1 error generated.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
> ---
> tools/build/feature/test-timerfd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/build/feature/test-timerfd.c b/tools/build/feature/test-timerfd.c
> index 9c72c697a9df..f88e8cc63ef3 100644
> --- a/tools/build/feature/test-timerfd.c
> +++ b/tools/build/feature/test-timerfd.c
> @@ -6,7 +6,7 @@
>
> int main(void)
> {
> - struct itimerspec new_value;
> + struct itimerspec new_value = {};
>
> int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
> if (fd < 0)
> --
> 2.55.0.1007.g17ff1f9808-goog
>
prev parent reply other threads:[~2026-09-12 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 21:39 [PATCH v1] tools build: Fix timerfd feature detection with clang Ian Rogers
2026-09-10 21:41 ` sashiko-bot
2026-09-12 20:15 ` Arnaldo Carvalho de Melo [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=aqWyyC4n0XvAFvux@x2 \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.