On 03/18/16 16:12, David Woodhouse wrote:
> Commit 7b8fe6356 ("OvmfPkg: PlatformPei: enable PCIEXBAR (aka MMCONFIG /
> ECAM) on Q35") broke the VS2008 build, causing it to complain of
> "potentially uninitialized local variable 'PciExBarBase' used" at
> line 275.
> 
> On this occasion it isn't actually wrong — the mHostBridgeDevId variable
> is global, so theoretically it *could* change between the two if()
> statements.
> 
> Of course VS2008 is also a steaming pile of poo, and even if we use
> a local boolean variable which definitely *can't* change in the middle,
> it still can't work it out and still emits the warning.
> 
> So just initialise PciExBarBase to zero to shut the compiler up.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: David Woodhouse <[email protected]>
> ---
> Oops, my build test on Windows still had the temporary 'PciExBarBase=0'
> to shut the compiler up, so wasn't really exercising the fix I was
> submitting. Sorry for the noise.
> 
> It turns out that VS2008 really is just a stupid pile of crap.
> 
> OvmfPkg/PlatformPei/Platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
> index 0fc2278..20008d0 100644
> --- a/OvmfPkg/PlatformPei/Platform.c
> +++ b/OvmfPkg/PlatformPei/Platform.c
> @@ -212,7 +212,7 @@ MemMapInitialization (
>  
>    if (!mXen) {
>      UINT32  TopOfLowRam;
> -    UINT64  PciExBarBase;
> +    UINT64  PciExBarBase = 0;
>      UINT32  PciBase;
>      UINT32  PciSize;
>  
> -- 
> 2.5.5
> 

Thank you for the patch.

I have three problems with it:

(1) The commit message uses at least one non-ASCII character, the EM
DASH (U+2014). Can you please replace it with a "--"? Yes, I know you
hate me for asking this. Please just write me off as stupid and replace
the character.

(2) In the edk2 coding style, initialization of local variables is not
permitted. Can you please add an assignment instead?

(3) I tried to apply your patch nonetheless. It doesn't apply. I looked
at the patch email that I saved from Thunderbird. The code section of
the email contains =C2=A0 quoted-printable sequences. Since the charset
is UTF-8 (according to the Content-Type header), 0xC2 0xA0 translates to
U+00A0, "NO-BREAK SPACE".

In the code, we just have plain space characters.

Can you please submit a v3 with the above addressed?

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to