Commit 3a31d8e4 authored by pgal.u-szeged's avatar pgal.u-szeged Committed by Commit bot

Move GLIB_DISABLE_DEPRECATION_WARNINGS define to a more general place.

The GLIB_DISABLE_DEPRECATION_WARNINGS define disables the deprecation
warnings which is caused by the usage of the g_settings_list_schemas
method. Moving the define to the build scripts avoids any future build
errors (-Werror) and warning reports.

BUG=391250
TEST=ninja -C out/Release chrome

Review URL: https://codereview.chromium.org/367113004

Cr-Commit-Position: refs/heads/master@{#292608}
parent 8e134e88
...@@ -147,7 +147,14 @@ if (use_brlapi) { ...@@ -147,7 +147,14 @@ if (use_brlapi) {
pkg_config("gio_config") { pkg_config("gio_config") {
packages = [ "gio-2.0" ] packages = [ "gio-2.0" ]
defines = [ "USE_GIO" ] # glib >=2.40 deprecate g_settings_list_schemas in favor of
# g_settings_schema_source_list_schemas. This function is not available on
# earlier versions that we still need to support (specifically, 2.32), so
# disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define.
# TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
# (saucy) and earlier. Update the code to use
# g_settings_schema_source_list_schemas instead.
defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ]
ignore_libs = true # Loader generated below. ignore_libs = true # Loader generated below.
} }
......
...@@ -567,12 +567,28 @@ ...@@ -567,12 +567,28 @@
'cflags': [ 'cflags': [
'<!@(<(pkg-config) --cflags gio-2.0)', '<!@(<(pkg-config) --cflags gio-2.0)',
], ],
'variables': {
'gio_warning_define': [
# glib >=2.40 deprecate g_settings_list_schemas in favor of
# g_settings_schema_source_list_schemas. This function is not
# available on earlier versions that we still need to support
# (specifically, 2.32), so disable the warning.
# TODO(mgiuca): Remove this suppression (and variable) when we
# drop support for Ubuntu 13.10 (saucy) and earlier. Update the
# code to use g_settings_schema_source_list_schemas instead.
'GLIB_DISABLE_DEPRECATION_WARNINGS',
],
},
'defines': [
'<(gio_warning_define)',
],
'direct_dependent_settings': { 'direct_dependent_settings': {
'cflags': [ 'cflags': [
'<!@(<(pkg-config) --cflags gio-2.0)', '<!@(<(pkg-config) --cflags gio-2.0)',
], ],
'defines': [ 'defines': [
'USE_GIO', 'USE_GIO',
'<(gio_warning_define)',
], ],
'include_dirs': [ 'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)', '<(SHARED_INTERMEDIATE_DIR)',
......
...@@ -4,15 +4,6 @@ ...@@ -4,15 +4,6 @@
#include "net/proxy/proxy_config_service_linux.h" #include "net/proxy/proxy_config_service_linux.h"
// glib >=2.40 deprecate g_settings_list_schemas in favor of
// g_settings_schema_source_list_schemas. This function is not available on
// earlier versions that we still need to support (specifically, 2.32), so
// disable the warning.
// TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10
// (saucy) and earlier. Update the code to use
// g_settings_schema_source_list_schemas instead.
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#if defined(USE_GCONF) #if defined(USE_GCONF)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment