[webkit-reviews] review granted: [Bug 122161] [iOS] WebCore fails to build with newer versions of clang : [Attachment 213090] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 1 09:23:42 PDT 2013


Darin Adler <darin at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 122161: [iOS] WebCore fails to build with newer versions of clang
https://bugs.webkit.org/show_bug.cgi?id=122161

Attachment 213090: Patch
https://bugs.webkit.org/attachment.cgi?id=213090&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=213090&action=review


> Source/WebCore/platform/network/mac/ResourceResponseMac.mm:97
> +static const size_t numberOfCommonHeaderFields = sizeof(commonHeaderFields)
/ sizeof(AtomicString*);

Would be much nicer to use the WTF_ARRAY_LENGTH macro instead and not give a
name to this. The code here actually divides the size of the array by the size
of a pointer to a different type!

> Source/WebCore/platform/network/mac/ResourceResponseMac.mm:135
> +	       for (size_t i = 0; i < numberOfCommonHeaderFields; i++) {

Would just say:

    for (unsigned i = 0; i < WTF_ARRAY_LENGTH(commonHeaderFields); ++i)


More information about the webkit-reviews mailing list