Unignore most warnings on POSIX in build/SConscript.main.
BUG=2053 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2272 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
base
build
net/base
skia
webkit
@ -28,6 +28,13 @@
|
||||
// The warning remains disabled until popped by MSVC_POP_WARNING.
|
||||
#define MSVC_PUSH_DISABLE_WARNING(n) __pragma(warning(push)) \
|
||||
__pragma(warning(disable:n))
|
||||
|
||||
// MSVC_PUSH_WARNING_LEVEL pushes |n| as the global warning level. The level
|
||||
// remains in effect until popped by MSVC_POP_WARNING(). Use 0 to disable all
|
||||
// warnings.
|
||||
#define MSVC_PUSH_WARNING_LEVEL(n) __pragma(warning(push, n))
|
||||
|
||||
// Pop effects of innermost MSVC_PUSH_* macro.
|
||||
#define MSVC_POP_WARNING() __pragma(warning(pop))
|
||||
|
||||
// Allows |this| to be passed as an argument in constructor initializer lists.
|
||||
@ -47,6 +54,7 @@
|
||||
|
||||
#define MSVC_SUPPRESS_WARNING(n)
|
||||
#define MSVC_PUSH_DISABLE_WARNING(n)
|
||||
#define MSVC_PUSH_WARNING_LEVEL(n)
|
||||
#define MSVC_POP_WARNING()
|
||||
#define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
|
||||
|
||||
|
@ -311,21 +311,10 @@ elif env['PLATFORM'] == 'posix':
|
||||
'webkit',
|
||||
]
|
||||
|
||||
# TODO: fix code that triggers these warnings.
|
||||
excluded_warnings = [
|
||||
'-Wno-unknown-pragmas', # TODO: remove all the Windows-specific #pragmas.
|
||||
'-Wno-unused-function', # TODO: there's just one Skia function.
|
||||
'-Wno-unused-variable', # TODO: there's just one v8 function.
|
||||
'-Wno-switch', # TODO: this is likely masking real bugs.
|
||||
'-Wno-sign-compare', # TODO: this is likely masking real bugs.
|
||||
'-Wno-missing-braces', # TODO: just a file in net.
|
||||
|
||||
# Not TODO: This is technically nonstandard, but a lot of the image
|
||||
# decoding code depends on it and osx wants this.
|
||||
'-Wno-multichar',
|
||||
|
||||
'-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3
|
||||
'-Wno-reorder', # TODO: many tedious small fixes.
|
||||
# TODO: Clean up uses of ext/hash_map and remove this.
|
||||
# (see unordered_map and base/hash_tables.h)
|
||||
'-Wno-deprecated' # Needed for using ext/hash_map on GCC 4.3
|
||||
]
|
||||
env.Replace(
|
||||
CCFLAGS = ['-m32', '-g', '-pthread'],
|
||||
|
@ -38,9 +38,8 @@ class ExampleEmployer::ExampleWorker
|
||||
: public base::RefCountedThreadSafe<ExampleWorker> {
|
||||
public:
|
||||
ExampleWorker(ExampleEmployer* employer, CompletionCallback* callback)
|
||||
: callback_(callback),
|
||||
employer_(employer),
|
||||
origin_loop_(MessageLoop::current()) {
|
||||
: employer_(employer), callback_(callback),
|
||||
origin_loop_(MessageLoop::current()) {
|
||||
}
|
||||
void DoWork();
|
||||
void DoCallback();
|
||||
|
@ -37,9 +37,8 @@ if env['PLATFORM'] == 'win32':
|
||||
],
|
||||
)
|
||||
elif env['PLATFORM'] in ('posix', 'darwin'):
|
||||
if '-Wall' in env['CCFLAGS']:
|
||||
# We're not responsible for bad warning hygiene in this third party code.
|
||||
env['CCFLAGS'].remove('-Wall')
|
||||
# Because images/SkStream.cpp has len asserts.
|
||||
env['CXXFLAGS'].append('-Wno-unused-variable')
|
||||
|
||||
input_files = [
|
||||
'animator/SkTime.cpp',
|
||||
|
@ -6,12 +6,13 @@
|
||||
#define WEBKIT_GLUE_EVENT_CONVERSION_H__
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "PlatformKeyboardEvent.h"
|
||||
#include "PlatformMouseEvent.h"
|
||||
#include "PlatformWheelEvent.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
namespace WebCore {
|
||||
class Widget;
|
||||
|
@ -2,8 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#define STRSAFE_NO_DEPRECATE
|
||||
#include <strsafe.h>
|
||||
#endif
|
||||
#include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h"
|
||||
|
||||
namespace NPAPIClient {
|
||||
@ -25,7 +30,7 @@ NPError NPObjectProxyTest::SetWindow(NPWindow* pNPWindow) {
|
||||
NPObject *doc = NPVARIANT_TO_OBJECT(docv);
|
||||
|
||||
NPVariant strv;
|
||||
#pragma warning(suppress: 4267)
|
||||
MSVC_SUPPRESS_WARNING(4267);
|
||||
STRINGZ_TO_NPVARIANT("div", strv);
|
||||
|
||||
NPVariant textv;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/gfx/platform_canvas.h"
|
||||
#include "base/scoped_ptr.h"
|
||||
#include "base/task.h"
|
||||
@ -38,11 +39,11 @@
|
||||
#include "webkit/glue/webplugin_delegate.h"
|
||||
#include "webkit/glue/webview_delegate.h"
|
||||
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "ResourceHandleClient.h"
|
||||
#include "Frame.h"
|
||||
#include "PlatformString.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
class AltErrorPageResourceFetcher;
|
||||
class WebErrorImpl;
|
||||
|
@ -5,9 +5,11 @@
|
||||
#ifndef WEBKIT_GLUE_WEBFRAMELOADERCLIENT_IMPL_H__
|
||||
#define WEBKIT_GLUE_WEBFRAMELOADERCLIENT_IMPL_H__
|
||||
|
||||
#pragma warning(push, 0)
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "FrameLoaderClient.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "googleurl/src/gurl.h"
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@ -11,7 +12,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "webkit_version.h"
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "BackForwardList.h"
|
||||
#include "Document.h"
|
||||
#include "FrameTree.h"
|
||||
@ -27,7 +28,7 @@
|
||||
#include "PlatformString.h"
|
||||
#include "RenderTreeAsText.h"
|
||||
#include "SharedBuffer.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
#if USE(V8_BINDING) || USE(JAVASCRIPTCORE_BINDINGS)
|
||||
#include "JSBridge.h" // for set flags
|
||||
|
@ -5,13 +5,14 @@
|
||||
#ifndef WEBKIT_GLUE_WEBURLREQUEST_IMPL_H__
|
||||
#define WEBKIT_GLUE_WEBURLREQUEST_IMPL_H__
|
||||
|
||||
#include "webkit/glue/weburlrequest.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "webkit/glue/weburlrequest.h"
|
||||
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "FrameLoadRequest.h"
|
||||
#include "HistoryItem.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
class WebRequestImpl : public WebRequest {
|
||||
public:
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/gfx/platform_canvas.h"
|
||||
#include "base/gfx/point.h"
|
||||
#include "base/gfx/size.h"
|
||||
@ -16,10 +17,10 @@
|
||||
#include "webkit/glue/webpreferences.h"
|
||||
#include "webkit/glue/webview.h"
|
||||
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "webkit/port/history/BackForwardList.h"
|
||||
#include "webkit/port/platform/WidgetClientWin.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
namespace WebCore {
|
||||
class Frame;
|
||||
|
@ -425,6 +425,8 @@ sub GenerateNormalAttrGetter
|
||||
}
|
||||
}
|
||||
|
||||
my $getterStringUsesImp = $implClassName ne "double";
|
||||
|
||||
# Getter
|
||||
push(@implContentDecls, <<END);
|
||||
static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) {
|
||||
@ -435,8 +437,12 @@ END
|
||||
push(@implContentDecls, <<END);
|
||||
V8SVGPODTypeWrapper<$implClassName>* imp_wrapper = V8Proxy::FastToNativeObject<V8SVGPODTypeWrapper<$implClassName> >(V8ClassIndex::$classIndex, info.Holder());
|
||||
$implClassName imp_instance = *imp_wrapper;
|
||||
END
|
||||
if ($getterStringUsesImp) {
|
||||
push(@implContentDecls, <<END);
|
||||
$implClassName* imp = &imp_instance;
|
||||
END
|
||||
}
|
||||
|
||||
} elsif ($attrExt->{"v8OnProto"}) {
|
||||
# perform lookup first
|
||||
@ -473,17 +479,20 @@ END
|
||||
|
||||
my $returnType = $codeGenerator->StripModule($attribute->signature->type);
|
||||
|
||||
my $getterString = "imp->$getterFunc(";
|
||||
$getterString .= "ec" if $useExceptions;
|
||||
$getterString .= ")";
|
||||
if (IsRefPtrType($returnType)) {
|
||||
$implIncludes{"wtf/GetPtr.h"} = 1;
|
||||
$getterString = "WTF::getPtr(" . $getterString . ")";
|
||||
}
|
||||
if ($nativeType eq "int" and $attribute->signature->extendedAttributes->{"ConvertFromString"}) {
|
||||
$getterString .= ".toInt()";
|
||||
}
|
||||
if ($implClassName eq "double") {
|
||||
my $getterString;
|
||||
if ($getterStringUsesImp) {
|
||||
$getterString = "imp->$getterFunc(";
|
||||
$getterString .= "ec" if $useExceptions;
|
||||
$getterString .= ")";
|
||||
if (IsRefPtrType($returnType)) {
|
||||
$implIncludes{"wtf/GetPtr.h"} = 1;
|
||||
$getterString = "WTF::getPtr(" . $getterString . ")";
|
||||
}
|
||||
if ($nativeType eq "int" and
|
||||
$attribute->signature->extendedAttributes->{"ConvertFromString"}) {
|
||||
$getterString .= ".toInt()";
|
||||
}
|
||||
} else {
|
||||
$getterString = "imp_instance";
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#ifndef V8_BINDING_H__
|
||||
#define V8_BINDING_H__
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include <v8.h>
|
||||
@ -14,9 +15,9 @@
|
||||
|
||||
// Suppress warnings in CString of converting size_t to unsigned int.
|
||||
// TODO(fqian): fix CString.h.
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "CString.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
// Use the platform.h for linux.
|
||||
@ -133,7 +134,7 @@ inline int ToInt32(v8::Handle<v8::Value> value) {
|
||||
// If a WebCore string length is greater than the threshold,
|
||||
// v8String creates an external string to avoid allocating
|
||||
// the string in the large object space (which has a high memory overhead).
|
||||
static const int kV8ExternalStringThreshold = 2048;
|
||||
static const unsigned int kV8ExternalStringThreshold = 2048;
|
||||
|
||||
// Convert a string to a V8 string.
|
||||
inline v8::Handle<v8::String> v8String(const String& str) {
|
||||
|
@ -24,16 +24,17 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "base/compiler_specific.h"
|
||||
|
||||
#define WIN32_COMPILE_HACK
|
||||
|
||||
#pragma warning(push, 0)
|
||||
MSVC_PUSH_WARNING_LEVEL(0);
|
||||
#include "Color.h"
|
||||
#include "SSLKeyGenerator.h"
|
||||
#include "KURL.h"
|
||||
#include "NotImplemented.h"
|
||||
#include "SharedBuffer.h"
|
||||
#pragma warning(pop)
|
||||
MSVC_POP_WARNING();
|
||||
|
||||
using namespace WebCore;
|
||||
|
||||
|
Reference in New Issue
Block a user