[Webkit-unassigned] [Bug 52585] REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.

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


https://bugs.webkit.org/show_bug.cgi?id=52585


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79209|review+                     |review-
               Flag|                            |




--- Comment #9 from Darin Adler <darin at apple.com>  2011-01-17 13:17:33 PST ---
(From update of attachment 79209)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list