diff options
| author | Andras Becsi <andras.becsi@digia.com> | 2013-04-04 19:14:29 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 15:25:32 +0200 |
| commit | d6ffb6e0ba2941ff69c9b8eaf6ccf383c5d03063 (patch) | |
| tree | 8a8992dd99283a2cf1144975066cfbcdd1e91c2c | |
| parent | 7da74c85821ff4fa3a0cbd8d6221c399a1214800 (diff) | |
| download | qtwebkit-d6ffb6e0ba2941ff69c9b8eaf6ccf383c5d03063.tar.gz | |
Fix the build with GCC 4.8 https://bugs.webkit.org/show_bug.cgi?id=113147
Reviewed by Allan Sandfeld Jensen.
Source/JavaScriptCore:
Initialize JSObject* exception to suppress warnings that make
the build fail because of -Werror=maybe-uninitialized.
* runtime/Executable.cpp:
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
Source/WTF:
Disable diagnostic warning -Wunused-local-typedefs for GCC 4.8
since dummy typedefs are commonly used in the codebase.
* wtf/Compiler.h:
Change-Id: I084a47068324c6b9ddd7f4274f7c5a2d10904627
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
| -rw-r--r-- | Source/JavaScriptCore/runtime/Executable.cpp | 4 | ||||
| -rw-r--r-- | Source/WTF/wtf/Compiler.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp index 746e281e3..ff4c2ff76 100644 --- a/Source/JavaScriptCore/runtime/Executable.cpp +++ b/Source/JavaScriptCore/runtime/Executable.cpp @@ -522,7 +522,7 @@ JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, JSScope* s UNUSED_PARAM(bytecodeIndex); #endif ASSERT((jitType == JITCode::bottomTierJIT()) == !m_codeBlockForCall); - JSObject* exception; + JSObject* exception = 0; OwnPtr<FunctionCodeBlock> newCodeBlock = produceCodeBlockFor(scope, CodeForCall, exception); if (!newCodeBlock) return exception; @@ -558,7 +558,7 @@ JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, JSSco #endif ASSERT((jitType == JITCode::bottomTierJIT()) == !m_codeBlockForConstruct); - JSObject* exception; + JSObject* exception = 0; OwnPtr<FunctionCodeBlock> newCodeBlock = produceCodeBlockFor(scope, CodeForConstruct, exception); if (!newCodeBlock) return exception; diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h index a9ef419c1..293e86b8b 100644 --- a/Source/WTF/wtf/Compiler.h +++ b/Source/WTF/wtf/Compiler.h @@ -122,6 +122,9 @@ /* Specific compiler features */ #if COMPILER(GCC) && !COMPILER(CLANG) +#if GCC_VERSION_AT_LEAST(4, 8, 0) +#pragma GCC diagnostic ignored "-Wunused-local-typedefs" +#endif #if GCC_VERSION_AT_LEAST(4, 7, 0) && defined(__cplusplus) && __cplusplus >= 201103L #define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1 #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1 |
