diff mbox series

[edk2,edk2-staging,17/19] IntelUndiPkg/GigUndiDxe: move MSFT warning overrides to INF file

Message ID 20181106175833.26964-18-ard.biesheuvel@linaro.org
State New
Headers show
Series IntelUndiPkg/GigUndiDxe: build fixes for AARCH64/ARM/GCC | expand

Commit Message

Ard Biesheuvel Nov. 6, 2018, 5:58 p.m. UTC
GCC chokes on the unknown MSVC specific #pragmas used for suppressing
warnings, so remove them and use the INF BuildOptions section instead.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf | 2 +-
 IntelUndiPkg/GigUndiDxe/e1000_osdep.h  | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

-- 
2.19.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ryszard Knop Jan. 30, 2019, 2:09 p.m. UTC | #1
Reviewed-by: Ryszard Knop <ryszard.knop@linux.intel.com>


On Tue, 2018-11-06 at 18:58 +0100, ard.biesheuvela wrote:
> GCC chokes on the unknown MSVC specific #pragmas used for suppressing

> warnings, so remove them and use the INF BuildOptions section

> instead.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>

> ---

>  IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf | 2 +-

>  IntelUndiPkg/GigUndiDxe/e1000_osdep.h  | 3 ---

>  2 files changed, 1 insertion(+), 4 deletions(-)

> 

> diff --git a/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf

> b/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf

> index 19dae9a0987a..9159e826ec45 100644

> --- a/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf

> +++ b/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf

> @@ -41,7 +41,7 @@ ENTRY_POINT          = InitializeGigUNDIDriver

>  UNLOAD_IMAGE         = GigUndiUnload

>  

>  [BuildOptions.common]

> -  MSFT:*_*_*_CC_FLAGS = /FAcs /D MDEPKG_NDEBUG

> +  MSFT:*_*_*_CC_FLAGS = /FAcs /D MDEPKG_NDEBUG /wd4244 /wd4206

>    GCC:RELEASE_*_*_CC_FLAGS = -D MDEPKG_NDEBUG

>  

>  [BuildOptions.X64]

> diff --git a/IntelUndiPkg/GigUndiDxe/e1000_osdep.h

> b/IntelUndiPkg/GigUndiDxe/e1000_osdep.h

> index 4408b409a445..70f33811dd04 100644

> --- a/IntelUndiPkg/GigUndiDxe/e1000_osdep.h

> +++ b/IntelUndiPkg/GigUndiDxe/e1000_osdep.h

> @@ -34,9 +34,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> POSSIBILITY OF SUCH DAMAGE.

>  #include <Library/BaseLib.h>

>  #include <Library/BaseMemoryLib.h>

>  

> -#pragma warning(disable : 4244)

> -#pragma warning(disable : 4206)

> -

>  #ifndef EFI_SPECIFICATION_VERSION

>  #define EFI_SPECIFICATION_VERSION 0x00020000

>  #endif /* EFI_SPECIFICATION_VERSION */


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf b/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf
index 19dae9a0987a..9159e826ec45 100644
--- a/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf
+++ b/IntelUndiPkg/GigUndiDxe/GigUndiDxe.inf
@@ -41,7 +41,7 @@  ENTRY_POINT          = InitializeGigUNDIDriver
 UNLOAD_IMAGE         = GigUndiUnload
 
 [BuildOptions.common]
-  MSFT:*_*_*_CC_FLAGS = /FAcs /D MDEPKG_NDEBUG
+  MSFT:*_*_*_CC_FLAGS = /FAcs /D MDEPKG_NDEBUG /wd4244 /wd4206
   GCC:RELEASE_*_*_CC_FLAGS = -D MDEPKG_NDEBUG
 
 [BuildOptions.X64]
diff --git a/IntelUndiPkg/GigUndiDxe/e1000_osdep.h b/IntelUndiPkg/GigUndiDxe/e1000_osdep.h
index 4408b409a445..70f33811dd04 100644
--- a/IntelUndiPkg/GigUndiDxe/e1000_osdep.h
+++ b/IntelUndiPkg/GigUndiDxe/e1000_osdep.h
@@ -34,9 +34,6 @@  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
 
-#pragma warning(disable : 4244)
-#pragma warning(disable : 4206)
-
 #ifndef EFI_SPECIFICATION_VERSION
 #define EFI_SPECIFICATION_VERSION 0x00020000
 #endif /* EFI_SPECIFICATION_VERSION */