From 4c0d99d173b9d7b7d30fece9cfb117f40ab27199 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 19 Nov 2021 01:15:46 -0500 Subject: Issue #457 - Silence warnings in libcairo and libpixman. We know these issues exist due to it being old 3rd party code. --- gfx/cairo/cairo/src/moz.build | 20 ++++++++++++++++++-- gfx/cairo/libpixman/src/moz.build | 11 +++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) (limited to 'gfx/cairo') diff --git a/gfx/cairo/cairo/src/moz.build b/gfx/cairo/cairo/src/moz.build index 6c81ce79a7..6d6f7c9d55 100644 --- a/gfx/cairo/cairo/src/moz.build +++ b/gfx/cairo/cairo/src/moz.build @@ -215,9 +215,23 @@ if CONFIG['MOZ_TREE_FREETYPE']: # Suppress warnings in third-party code. if CONFIG['_MSC_VER']: CFLAGS += [ - '-wd4005', - '-wd4146', + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4018', # '>' : signed/unsigned mismatch + '-wd4047', # different levels of indirection + '-wd4101', # unreferenced local variable + '-wd4133', # 'function' : incompatible types + '-wd4146', # unary minus operator applied to unsigned type + '-wd4311', # 'variable' : pointer truncation from 'type' to 'type' + '-wd4477', # format string '%s' requires an argument of type 'type' + '-wd4996', # The compiler encountered a deprecated declaration. ] + CXXFLAGS += [ + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4018', # '>' : signed/unsigned mismatch + '-wd4146', # unary minus operator applied to unsigned type + '-wd4828', # illegal in the current source character set + '-wd4838', # requires a narrowing conversion +] if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-enum-compare', @@ -228,6 +242,7 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: '-Wno-conversion', '-Wno-unused-but-set-variable', ] + if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-incompatible-pointer-types', @@ -235,6 +250,7 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: '-Wno-tautological-constant-out-of-range-compare', '-Wno-error=uninitialized', ] + if CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-deprecated-register', diff --git a/gfx/cairo/libpixman/src/moz.build b/gfx/cairo/libpixman/src/moz.build index 6bfa22dc0a..7c3e900899 100644 --- a/gfx/cairo/libpixman/src/moz.build +++ b/gfx/cairo/libpixman/src/moz.build @@ -130,6 +130,15 @@ if use_arm_neon_gcc: SOURCES['pixman-arm-neon.c'].flags += CONFIG['NEON_FLAGS'] # Suppress warnings in third-party code. +if CONFIG['_MSC_VER']: + CFLAGS += [ + '-wd4047', # different levels of indirection + '-wd4101', # unreferenced local variable + '-wd4133', # 'function' : incompatible types + '-wd4146', # unary minus operator applied to unsigned type + '-wd4311', # 'variable' : pointer truncation from 'type' to 'type' + ] + if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-address', @@ -137,12 +146,14 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: '-Wno-sign-compare', '-Wno-unused', # too many unused warnings; ignore ] + if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-incompatible-pointer-types', '-Wno-tautological-compare', '-Wno-tautological-constant-out-of-range-compare', ] + if CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-unused-variable', -- cgit v1.2.3