From: Richard Cochran <richardcochran@gmail.com>
To: trix@redhat.com
Cc: natechancellor@gmail.com, ndesaulniers@google.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH] ptp: ptp_clockmatrix: initialize variables
Date: Mon, 12 Oct 2020 15:01:26 -0700 [thread overview]
Message-ID: <20201012220126.GB1310@hoboy> (raw)
In-Reply-To: <20201011200955.29992-1-trix@redhat.com>
On Sun, Oct 11, 2020 at 01:09:55PM -0700, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> Clang static analysis reports this representative problem
>
> ptp_clockmatrix.c:1852:2: warning: 5th function call argument
> is an uninitialized value
> snprintf(idtcm->version, sizeof(idtcm->version), "%u.%u.%u",
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> idtcm_display_version_info() calls several idtcm_read_*'s without
> checking a return status.
So why not check the return status?
Your patch papers over the issue.
Thanks,
Richard
next prev parent reply other threads:[~2020-10-12 22:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-11 20:09 [PATCH] ptp: ptp_clockmatrix: initialize variables trix
2020-10-12 22:01 ` Richard Cochran [this message]
2020-10-13 4:07 ` Tom Rix
2020-10-13 12:40 ` Richard Cochran
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=20201012220126.GB1310@hoboy \
--to=richardcochran@gmail.com \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=trix@redhat.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;
as well as URLs for NNTP newsgroup(s).