Changeset 66729 in webkit


Ignore:
Timestamp:
Sep 3, 2010 6:57:09 AM (14 years ago)
Author:
Csaba Osztrogonác
Message:

2010-09-03 Csaba Osztrogonác <Csaba Osztrogonác>

Reviewed by Simon Hausmann.

Fix warning in wtf/ByteArray.h
https://bugs.webkit.org/show_bug.cgi?id=44672

  • wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r66706 r66729  
     12010-09-03  Csaba Osztrogonác  <ossy@webkit.org>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Fix warning in wtf/ByteArray.h
     6        https://bugs.webkit.org/show_bug.cgi?id=44672
     7
     8        * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
     9
    1102010-09-02  Adam Barth  <abarth@webkit.org>
    211
  • trunk/JavaScriptCore/wtf/ByteArray.h

    r47456 r66729  
    2727#define ByteArray_h
    2828
     29#include <limits.h>
    2930#include <wtf/PassRefPtr.h>
     31#include <wtf/Platform.h>
    3032#include <wtf/RefCounted.h>
    3133
     
    8789        }
    8890        size_t m_size;
    89         unsigned char m_data[sizeof(size_t)];
     91// MSVC can't handle correctly unsized array.
     92// warning C4200: nonstandard extension used : zero-sized array in struct/union
     93// Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array
     94#if COMPILER(MSVC)
     95        unsigned char m_data[INT_MAX];
     96#else
     97        unsigned char m_data[];
     98#endif
    9099    };
    91100}
Note: See TracChangeset for help on using the changeset viewer.