From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=kuezrMaj; spf=pass (domain: linaro.org, ip: 209.85.166.193, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-it1-f193.google.com (mail-it1-f193.google.com [209.85.166.193]) by groups.io with SMTP; Mon, 22 Apr 2019 15:02:27 -0700 Received: by mail-it1-f193.google.com with SMTP id y10so20647286itc.1 for ; Mon, 22 Apr 2019 15:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XNAjCVLUOVi+d1263n9sFR0Wg28nFQCTe/WNWWOcxJo=; b=kuezrMajD4toIjKgNp91rHiI3pWtT8HjpHkPp3LMqUOdX8gVh+M1dvsQqms7pw+0S1 twquldZf7OqYFHEmneF9WO46meaLA1fd7dmzFrsghknL6D2jCvrno3sRkIOFYnsj7X0y zqNAg6TchpjyCps7rdzDoOi36xdBEkmNZW7+tesKcka6kn/qfmbtgiZ366x0/G3oKJwT bGh4LKZJEc86Ehf0PA4dwlMXV2+0MqIKjrHV6ImXt1cqllXk8dpdRmcqRQtOzcIB3qQB Iyj92kH82M9i5ejIYH6/PSqhr7J13PyAP931m00jHt0/8klfUq6rXqtV0eX4lVovQ5aM 70Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XNAjCVLUOVi+d1263n9sFR0Wg28nFQCTe/WNWWOcxJo=; b=ex0JiC1cOw+rnZPIeShN/qmBvXQEn4w7KseUkbv/hnWCdLIJrspykJDEPQ1WBUxrje cViBM7CAI9wGzA+dEIW+vwKgFGqLSNtQLjiy3TzQsYbzMWVR8Jd8oX2/vzPo9YksA4y2 uQnJhkjPiyKxrWUNbcS5v9zzXx/IhHaSOLlyMYAOcKaSLJXvhsEip4oATjnj1nKZoXip UkaXEZIWe0nEG22XXP9jPtIdKYxJYCCCZCk0kfcUlTUBTWkp4clMxx4I3uGmvVIVYlWo pkw6ca22DBh/wcckxO/aJoNbK2UaLukJYcOIoxC/wlufw/roEZY0u73fYd0cf1SVrlYP kkcA== X-Gm-Message-State: APjAAAXO6p2JkbxSCdIOv7lcVWx8PsVFzavbh1I4dYDyj0/p69ltctfT GEPIkdBt4qGb0O1S38gzPcRKRz/n/n6XcFHvFJfb30yKGiE= X-Google-Smtp-Source: APXvYqzDk5cJ7/sAyKQIMtn/3aOz8oWCy7UdIwqW2UWM7F4FtZ1YirjVNpeCd8wnfkpQnqD8WhG51wzUIRqmzMTBgpE= X-Received: by 2002:a24:1312:: with SMTP id 18mr281471itz.121.1555970546854; Mon, 22 Apr 2019 15:02:26 -0700 (PDT) MIME-Version: 1.0 References: <20190422072447.10548-1-hao.a.wu@intel.com> In-Reply-To: From: "Ard Biesheuvel" Date: Tue, 23 Apr 2019 00:02:15 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/DxeCore: Please static checker for false report To: edk2-devel-groups-io , "Kinney, Michael D" Cc: "Wu, Hao A" , "Gao, Liming" , "Wang, Jian J" Content-Type: text/plain; charset="UTF-8" On Mon, 22 Apr 2019 at 23:53, Michael D Kinney 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.