OvmfPkg/QemuFwCfgLib: Suppress GCC49 IA32 build failure

NumPages variable was introduced in commit 66c548be50. In this commit
we allocate an intermediate buffer when SEV is enabled. The 'BounceBuffer'
variable points to the intermediate buffer pointer and NumPages variables
stores the number of pages. Later in the code, 'BounceBuffer' variable is
checked to see if we need to free the intermediate buffers. The code looks
correct, suppress the warning.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: s/warnigns/warnings/ in the code comment]
[lersek@redhat.com: add Gerd's Reported-by]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Brijesh Singh 2017-07-11 14:38:13 -04:00 committed by Laszlo Ersek
parent ed6da357a3
commit e508e069a8
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,11 @@ InternalQemuFwCfgDmaBytes (
return;
}
//
// set NumPages to suppress incorrect compiler/analyzer warnings
//
NumPages = 0;
//
// When SEV is enabled then allocate DMA bounce buffer
//