Changeset 257908 in webkit


Ignore:
Timestamp:
Mar 5, 2020 12:54:49 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

[JSCOnly] 32-bits warning on memset of JSValue
https://bugs.webkit.org/show_bug.cgi?id=204411

Patch by Paulo Matos <Paulo Matos> on 2020-03-05
Reviewed by Mark Lam.

Fixes warning on 32bit builds. This is required because GCC knows
it is not safe to use memset on non-POD types and warns against its use.

  • heap/GCMemoryOperations.h:

(JSC::gcSafeZeroMemory):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r257907 r257908  
     12020-03-05  Paulo Matos  <pmatos@igalia.com>
     2
     3        [JSCOnly] 32-bits warning on memset of JSValue
     4        https://bugs.webkit.org/show_bug.cgi?id=204411
     5
     6        Reviewed by Mark Lam.
     7
     8        Fixes warning on 32bit builds. This is required because GCC knows
     9        it is not safe to use memset on non-POD types and warns against its use.
     10
     11        * heap/GCMemoryOperations.h:
     12        (JSC::gcSafeZeroMemory):
     13
    1142020-03-04  Mark Lam  <mark.lam@apple.com>
    215
  • trunk/Source/JavaScriptCore/heap/GCMemoryOperations.h

    r252949 r257908  
    307307#endif // COMPILER(GCC_COMPATIBLE)
    308308#else
    309     memset(dst, 0, bytes);
     309    memset(reinterpret_cast<char*>(dst), 0, bytes);
    310310#endif // USE(JSVALUE64)
    311311}
Note: See TracChangeset for help on using the changeset viewer.