]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuFwCfgLib: Suppress GCC49 IA32 build failure
authorBrijesh Singh <brijesh.singh@amd.com>
Tue, 11 Jul 2017 18:38:13 +0000 (14:38 -0400)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 11 Jul 2017 22:16:41 +0000 (00:16 +0200)
NumPages variable was introduced in commit 66c548be509d. 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>
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c

index dbebd36b18530dbebac6f7fc1e7a1ea4fd4c2966..d3bf75498d60f0f684e6b0ccbb792f78157df503 100644 (file)
@@ -82,6 +82,11 @@ InternalQemuFwCfgDmaBytes (
     return;\r
   }\r
 \r
+  //\r
+  // set NumPages to suppress incorrect compiler/analyzer warnings\r
+  //\r
+  NumPages = 0;\r
+\r
   //\r
   // When SEV is enabled then allocate DMA bounce buffer\r
   //\r