diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-19 13:14:06 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-04 10:41:00 (GMT) |
commit | b9fdc5636c166e26195d783378ff4da43b755bc5 (patch) | |
tree | 68d7467d8310eca01e75f8707ca9ca3a43e09f6a /src/3rdparty | |
parent | 6f1ff47beeee6a6af489df58813ebd87237c93b0 (diff) | |
download | Qt-b9fdc5636c166e26195d783378ff4da43b755bc5.zip Qt-b9fdc5636c166e26195d783378ff4da43b755bc5.tar.gz Qt-b9fdc5636c166e26195d783378ff4da43b755bc5.tar.bz2 |
Fix compilation error on Solaris: mmap/munmap take/return a char*, not void*.
"../JavaScriptCore/interpreter/RegisterFile.h", line 128: Error: Using static_cast to convert from char* to JSC::Register* not allowed.
Error: Formal argument 1 of type char* in call to munmap(char*, unsigned) is being passed JSC::Register*.
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 06ddefc..29a13ca 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -34,7 +34,7 @@ namespace JSC { RegisterFile::~RegisterFile() { #if HAVE(MMAP) - munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); + munmap(reinterpret_cast<char*>(m_buffer), ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); #elif HAVE(VIRTUALALLOC) VirtualFree(m_buffer, 0, MEM_RELEASE); #else diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 5a34d11..14e189e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -105,7 +105,7 @@ namespace JSC { ReturnValueRegister = -4, ArgumentCount = -3, Callee = -2, - OptionalCalleeArguments = -1, + OptionalCalleeArguments = -1 }; enum { ProgramCodeThisRegister = -CallFrameHeaderSize - 1 }; @@ -174,7 +174,7 @@ namespace JSC { size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); #if HAVE(MMAP) - m_buffer = static_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); + m_buffer = reinterpret_cast<Register*>(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); if (m_buffer == MAP_FAILED) { #if PLATFORM(WINCE) fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); |