Rubberstamped by Geoff and Maciej
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2007 00:35:25 +0000 (00:35 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2007 00:35:25 +0000 (00:35 +0000)
        Fix MSVC build warning due to out of range data in a char array

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::defaultIcon): The buffer is now unsigned data

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::SharedBuffer): Add the "unsigned char*" c'tor
        * platform/SharedBuffer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp
WebCore/platform/SharedBuffer.cpp
WebCore/platform/SharedBuffer.h

index bfa791becb1508ee6d34d98edca09a5766273f25..2ec591524169b37f0ccdeba6e276bff54f81b42f 100644 (file)
@@ -1,3 +1,16 @@
+2007-09-13  Brady Eidson  <beidson@apple.com>
+
+        Rubberstamped by Geoff and Maciej
+
+        Fix MSVC build warning due to out of range data in a char array
+
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::defaultIcon): The buffer is now unsigned data
+
+        * platform/SharedBuffer.cpp:
+        (WebCore::SharedBuffer::SharedBuffer): Add the "unsigned char*" c'tor
+        * platform/SharedBuffer.h:
+
 2007-09-13  Darin Adler  <darin@apple.com>
 
         Reviewed by Oliver.
index e38c8f2b8281faf19af721569a918662490b7f9c..6a4f7921ed5f04f56f7abe92d62e2cbf0d74d622 100644 (file)
@@ -371,7 +371,7 @@ Image* IconDatabase::defaultIcon(const IntSize& size)
 {
     ASSERT_NOT_SYNC_THREAD();
 
-    static const char defaultIconData[] = { 0x4D, 0x4D, 0x00, 0x2A, 0x00, 0x00, 0x03, 0x32, 0x80, 0x00, 0x20, 0x50, 0x38, 0x24, 0x16, 0x0D, 0x07, 0x84, 0x42, 0x61, 0x50, 0xB8, 
+    static const unsigned char defaultIconData[] = { 0x4D, 0x4D, 0x00, 0x2A, 0x00, 0x00, 0x03, 0x32, 0x80, 0x00, 0x20, 0x50, 0x38, 0x24, 0x16, 0x0D, 0x07, 0x84, 0x42, 0x61, 0x50, 0xB8, 
         0x64, 0x08, 0x18, 0x0D, 0x0A, 0x0B, 0x84, 0xA2, 0xA1, 0xE2, 0x08, 0x5E, 0x39, 0x28, 0xAF, 0x48, 0x24, 0xD3, 0x53, 0x9A, 0x37, 0x1D, 0x18, 0x0E, 0x8A, 0x4B, 0xD1, 0x38, 
         0xB0, 0x7C, 0x82, 0x07, 0x03, 0x82, 0xA2, 0xE8, 0x6C, 0x2C, 0x03, 0x2F, 0x02, 0x82, 0x41, 0xA1, 0xE2, 0xF8, 0xC8, 0x84, 0x68, 0x6D, 0x1C, 0x11, 0x0A, 0xB7, 0xFA, 0x91, 
         0x6E, 0xD1, 0x7F, 0xAF, 0x9A, 0x4E, 0x87, 0xFB, 0x19, 0xB0, 0xEA, 0x7F, 0xA4, 0x95, 0x8C, 0xB7, 0xF9, 0xA9, 0x0A, 0xA9, 0x7F, 0x8C, 0x88, 0x66, 0x96, 0xD4, 0xCA, 0x69, 
index e0edca0962bae3ab0763462d37e0c4f593ac75ea..d467d72982bc15d98c28d240a13a3c994e87df6f 100644 (file)
@@ -37,6 +37,11 @@ SharedBuffer::SharedBuffer(const char* data, int size)
     m_buffer.append(data, size);
 }
 
+SharedBuffer::SharedBuffer(const unsigned char* data, int size)
+{
+    m_buffer.append(data, size);
+}
+
 unsigned SharedBuffer::size() const
 {
     if (hasPlatformData())
index a5cbfeb69698c917cdce74684518ebf203d40d17..c05e908cfda5d456d5bfa5d094bc369c73605e83 100644 (file)
@@ -47,6 +47,7 @@ class SharedBuffer : public Shared<SharedBuffer> {
 public:
     SharedBuffer();
     SharedBuffer(const char*, int);
+    SharedBuffer(const unsigned char*, int);
 
     static PassRefPtr<SharedBuffer> createWithContentsOfFile(const String& filePath);