From 529b59a04e76f70215ca70a4b2230beee4e86fc8 Mon Sep 17 00:00:00 2001 From: Fedor Date: Thu, 12 Mar 2020 20:39:43 +0300 Subject: [PATCH] Reduce compiler warnings in ICU. --- config/external/icu/common/Makefile.in | 12 ++++++++++++ config/external/icu/defs.mozbuild | 11 +++++++++++ config/external/icu/i18n/Makefile.in | 12 ++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 config/external/icu/common/Makefile.in create mode 100644 config/external/icu/i18n/Makefile.in diff --git a/config/external/icu/common/Makefile.in b/config/external/icu/common/Makefile.in new file mode 100644 index 000000000..89ad2e8b8 --- /dev/null +++ b/config/external/icu/common/Makefile.in @@ -0,0 +1,12 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +include $(topsrcdir)/config/rules.mk + +ifdef _MSC_VER +CXXFLAGS := $(filter-out -GR-,$(CXXFLAGS)) +CFLAGS := $(filter-out -GR-,$(CFLAGS)) +endif diff --git a/config/external/icu/defs.mozbuild b/config/external/icu/defs.mozbuild index 666bd4f6d..ad5b29378 100644 --- a/config/external/icu/defs.mozbuild +++ b/config/external/icu/defs.mozbuild @@ -47,3 +47,14 @@ if CONFIG['CLANG_CL']: '-Wno-macro-redefined', '-Wno-microsoft-include', ] + +if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']: + CFLAGS += [ + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4996', # The compiler encountered a deprecated declaration. + ] + CXXFLAGS += [ + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4333', # '>>' : right shift by too large amount, data loss + '-wd4996', # The compiler encountered a deprecated declaration. + ] diff --git a/config/external/icu/i18n/Makefile.in b/config/external/icu/i18n/Makefile.in new file mode 100644 index 000000000..89ad2e8b8 --- /dev/null +++ b/config/external/icu/i18n/Makefile.in @@ -0,0 +1,12 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +include $(topsrcdir)/config/rules.mk + +ifdef _MSC_VER +CXXFLAGS := $(filter-out -GR-,$(CXXFLAGS)) +CFLAGS := $(filter-out -GR-,$(CFLAGS)) +endif