WebCore/ChangeLog

112010-01-05 Yong Li <yong.li@torchmobile.com>
22
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Fix build warnings blindly
 6 https://bugs.webkit.org/show_bug.cgi?id=33178
 7
 8 * platform/SharedBuffer.cpp:
 9 (WebCore::SharedBuffer::append):
 10
 112010-01-05 Yong Li <yong.li@torchmobile.com>
 12
313 Reviewed by Darin Adler.
414
515 Fix an obvious bug and build errors in previous commit (r52795)

WebCore/platform/SharedBuffer.cpp

@@void SharedBuffer::append(const char* data, int length)
141141
142142 for (;;) {
143143 memcpy(segment, data, bytesToCopy);
144  if (length == bytesToCopy)
 144 if (static_cast<unsigned>(length) == bytesToCopy)
145145 break;
146146
147  length -= bytesToCopy;
 147 length -= static_cast<int>(bytesToCopy);
148148 data += bytesToCopy;
149149 segment = allocateSegment();
150150 m_segments.append(segment);
151  bytesToCopy = length < segmentSize ? length : segmentSize;
 151 bytesToCopy = static_cast<unsigned>(length) < segmentSize ? static_cast<unsigned>(length) : segmentSize;
152152 }
153153}
154154