Changeset 75992 in webkit


Ignore:
Timestamp:
Jan 17, 2011 7:10:32 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-17 Jarred Nicholls <jarred@sencha.com>

Reviewed by Csaba Osztrogonác.

REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=52585

gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
the return value to get around the gcc warning

  • jit/ExecutableAllocatorFixedVMPool.cpp: (JSC::maybeModifyVMPoolSize):
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r75991 r75992  
     12011-01-17  Jarred Nicholls  <jarred@sencha.com>
     2
     3        Reviewed by Csaba Osztrogonác.
     4
     5        REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
     6        https://bugs.webkit.org/show_bug.cgi?id=52585
     7       
     8        gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
     9        the return value to get around the gcc warning
     10
     11        * jit/ExecutableAllocatorFixedVMPool.cpp:
     12        (JSC::maybeModifyVMPoolSize):
     13
    1142011-01-17  Michael Saboff  <msaboff@apple.com>
    215
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp

    r75891 r75992  
    462462
    463463    unsigned overcommit = 0;
    464     fscanf(fp, "%u", &overcommit);
    465     if (overcommit == 1) {
    466         vmPoolSize = vmPoolSizeOvercommit;
    467         coalesceLimit = coalesceLimitOvercommit;
     464    if (fscanf(fp, "%u", &overcommit) == 1) {
     465        if (overcommit == 1) {
     466            vmPoolSize = vmPoolSizeOvercommit;
     467            coalesceLimit = coalesceLimitOvercommit;
     468        }
    468469    }
    469470
Note: See TracChangeset for help on using the changeset viewer.