From: Nick Alcock <nick.alcock@oracle.com>
To: dtrace-devel@oss.oracle.com, dtrace@lists.linux.dev
Subject: Re: [DTrace-devel] [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data()
Date: Tue, 14 Apr 2026 22:43:11 +0100 [thread overview]
Message-ID: <87se8x1amo.fsf@esperi.org.uk> (raw)
In-Reply-To: <20260331010224.16165-5-eugene.loh@oracle.com> (eugene loh's message of "Mon, 30 Mar 2026 21:02:23 -0400")
On 31 Mar 2026, eugene loh told this:
> From: Eugene Loh <eugene.loh@oracle.com>
>
> Some compilers warn:
>
> libcommon/usdt_parser.c: In function ‘usdt_copyin_data’:
> libcommon/usdt_parser.c:191:15: warning:
> ‘last’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> last->next = blk;
> ~~~~~~~~~~~^~~~~
>
> Change the "if" check to make it easier for compilers to recognize
> that "last" will be initialized (and non-NULL even!).
>
> Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Ugh. Still, if it works, it works, and it's semantically the same.
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
--
NULL && (void)
next prev parent reply other threads:[~2026-04-14 21:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 1:02 [PATCH 1/6] test: Skip tst.depth.sh eugene.loh
2026-03-31 1:02 ` [PATCH 2/6] Simple typo in comment eugene.loh
2026-04-14 21:36 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 3/6] Check if the BPF PROG_LOAD is either -1 or else non-negative eugene.loh
2026-04-14 21:40 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 4/6] test: Remove unnecessary "destructive" pragma eugene.loh
2026-04-14 21:41 ` [DTrace-devel] " Nick Alcock
2026-03-31 1:02 ` [PATCH 5/6] Possible uninitialized 'last' variable in usdt_copyin_data() eugene.loh
2026-04-14 21:43 ` Nick Alcock [this message]
2026-03-31 1:02 ` [PATCH 6/6] test: Check declaration (without init) inside a probe eugene.loh
2026-04-14 21:44 ` [DTrace-devel] " Nick Alcock
2026-04-14 21:35 ` [DTrace-devel] [PATCH 1/6] test: Skip tst.depth.sh Nick Alcock
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=87se8x1amo.fsf@esperi.org.uk \
--to=nick.alcock@oracle.com \
--cc=dtrace-devel@oss.oracle.com \
--cc=dtrace@lists.linux.dev \
/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