From: "Andrew Fish" <afish@apple.com>
To: devel@edk2.groups.io, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Mike Kinney <michael.d.kinney@intel.com>,
"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: Mon, 22 Apr 2019 16:14:10 -0700 [thread overview]
Message-ID: <1E074AE0-9C30-4BD4-BC0B-1D4DB042623E@apple.com> (raw)
In-Reply-To: <CAKv+Gu9MWcDuwKNrvZYROBUt91Ub_pYkyRPe48LRZGbQmeSRXA@mail.gmail.com>
> On Apr 22, 2019, at 3:02 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> 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.
>
Ard,
This would be a really good item to put on our longer term list of enhancements.
Thanks,
Andrew Fish
>
>
prev parent reply other threads:[~2019-04-22 23:14 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 ` [edk2-devel] " Ard Biesheuvel
2019-04-22 23:14 ` Andrew Fish [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-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=1E074AE0-9C30-4BD4-BC0B-1D4DB042623E@apple.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