[webkit-reviews] review denied: [Bug 52585] REGRESSION(r75709): Return value of fscanf() shouldn't be ignored. : [Attachment 79209] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 17 13:17:33 PST 2011


Darin Adler <darin at apple.com> has denied  review:
Bug 52585: REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=52585

Attachment 79209: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=79209&action=review

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

> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:466
> +    // We have to use the return value of fscanf to avoid "ignoring return
value" gcc warning
> +    // See https://bugs.webkit.org/show_bug.cgi?id=45384 for details.

This comment isn’t needed. We need to check the return value of fscanf because
that’s how you use fscanf! I don’t think we need a reference to this bug.

> Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp:467
> +    if (fscanf(fp, "%u", &overcommit)) {

This is not right. We need to check if the value is 1 rather than checking for
0. This function can return EOF, for example. Since we’re going to the trouble
to check here, I suggest doing the check correctly.


More information about the webkit-reviews mailing list