Enable more compilation checks in clang
These checks were disabled in Chromium due to historical reason. Also fix compilation errors as a result of the above mentioned change. Change-Id: I5d240f2f11aa5920598f954d696a15bdcbf78fd8
This commit is contained in:
parent
cb12a2bad2
commit
301f8c134d
|
@ -0,0 +1,33 @@
|
|||
# Copyright 2014 Google Inc. All rights reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file or at
|
||||
# https://developers.google.com/open-source/licenses/bsd
|
||||
#
|
||||
# This file contains common settings for building packager components.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as Chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'conditions': [
|
||||
['clang==1', {
|
||||
# Revert the relevant settings in Chromium's common.gypi.
|
||||
'cflags!': [
|
||||
'-Wno-char-subscripts',
|
||||
'-Wno-unneeded-internal-declaration',
|
||||
'-Wno-covered-switch-default',
|
||||
|
||||
# C++11-related flags:
|
||||
'-Wno-c++11-narrowing',
|
||||
'-Wno-reserved-user-defined-literal',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}
|
|
@ -13,9 +13,11 @@
|
|||
|
||||
namespace media {
|
||||
|
||||
#define TAG(a, b, c, d) \
|
||||
((static_cast<uint8>(a) << 24) | (static_cast<uint8>(b) << 16) | \
|
||||
(static_cast<uint8>(c) << 8) | (static_cast<uint8>(d)))
|
||||
#define TAG(a, b, c, d) \
|
||||
((static_cast<uint32>(static_cast<uint8>(a)) << 24) | \
|
||||
(static_cast<uint8>(b) << 16) | \
|
||||
(static_cast<uint8>(c) << 8) | \
|
||||
(static_cast<uint8>(d)))
|
||||
|
||||
#define RCHECK(x) \
|
||||
do { \
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'base',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'media_event',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'file',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'filters',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'mp2t',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'mp4',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'mpeg',
|
||||
|
|
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'../..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'run_all_unittests',
|
||||
|
|
12
mpd/mpd.gyp
12
mpd/mpd.gyp
|
@ -7,15 +7,9 @@
|
|||
# GYP file for any MPD generation targets.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'..',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'../common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'media_info_proto',
|
||||
|
|
12
packager.gyp
12
packager.gyp
|
@ -5,15 +5,9 @@
|
|||
# https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
{
|
||||
'variables': {
|
||||
# Compile as chromium code to enable warnings and warnings-as-errors.
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'target_defaults': {
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
},
|
||||
'includes': [
|
||||
'common.gypi',
|
||||
],
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'packager',
|
||||
|
|
Loading…
Reference in New Issue