public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>,
	 "Wang, Jian J" <jian.j.wang@intel.com>
Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/DxeCore: Please static checker for false report
Date: Tue, 23 Apr 2019 00:02:15 +0200	[thread overview]
Message-ID: <CAKv+Gu9MWcDuwKNrvZYROBUt91Ub_pYkyRPe48LRZGbQmeSRXA@mail.gmail.com> (raw)
In-Reply-To: <E92EE9817A31E24EB0585FDF735412F5B9C9C640@ORSMSX113.amr.corp.intel.com>

On Mon, 22 Apr 2019 at 23:53, Michael D Kinney
<michael.d.kinney@intel.com> wrote:
>
> Ard,
>
> This seems to be a common limitation seen in some
> static analyzers.  We have not found a workaround
> that does not involve code changes to quiet the
> false positives.
>
> For this specific case, I think the code change I
> suggest is correct.
>

I agree that the change is correct, and isn't that intrusive in this
particular case, so I don't have any objections to it.

I was just thinking aloud whether the IN vs OUT modifiers could be put
to use here. There are some examples in Linux of the patten

#ifdef __CHECKER__
#define ...
#else
#define ...
#endif

where __CHECKER__ is only set by the 'sparse' tool, which is basically
a combination of a static checker with a more pedantic coding style
checker.

I guess in our case, we'dl have to cater for multiple build
environments and more than one static checker, so this is probably not
as easy to achieve, unfortunately.

  reply	other threads:[~2019-04-22 22:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22  7:24 [PATCH v1] MdeModulePkg/DxeCore: Please static checker for false report Wu, Hao A
2019-04-22 14:40 ` Michael D Kinney
2019-04-22 21:25   ` Ard Biesheuvel
2019-04-22 21:53     ` Michael D Kinney
2019-04-22 22:02       ` Ard Biesheuvel [this message]
2019-04-22 23:14         ` [edk2-devel] " Andrew Fish

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-list 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=CAKv+Gu9MWcDuwKNrvZYROBUt91Ub_pYkyRPe48LRZGbQmeSRXA@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /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