Changeset 85046 in webkit


Ignore:
Timestamp:
Apr 27, 2011 4:45:23 AM (13 years ago)
Author:
hans@chromium.org
Message:

2011-04-27 Hans Wennborg <hans@chromium.org>

Reviewed by Tony Gentilcore.

IndexedDB: Fix compiler warnings about uninitialized variables
https://bugs.webkit.org/show_bug.cgi?id=59599

Build fix. No new tests.

  • storage/IDBLevelDBBackingStore.cpp: (WebCore::getNewObjectStoreId): (WebCore::getNewIndexId):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85045 r85046  
     12011-04-27  Hans Wennborg  <hans@chromium.org>
     2
     3        Reviewed by Tony Gentilcore.
     4
     5        IndexedDB: Fix compiler warnings about uninitialized variables
     6        https://bugs.webkit.org/show_bug.cgi?id=59599
     7
     8        Build fix. No new tests.
     9
     10        * storage/IDBLevelDBBackingStore.cpp:
     11        (WebCore::getNewObjectStoreId):
     12        (WebCore::getNewIndexId):
     13
    1142011-04-26  Hans Wennborg  <hans@chromium.org>
    215
  • trunk/Source/WebCore/storage/IDBLevelDBBackingStore.cpp

    r85045 r85046  
    304304    }
    305305
    306     int64_t maxObjectStoreId;
     306    int64_t maxObjectStoreId = -1;
    307307    const Vector<char> maxObjectStoreIdKey = DatabaseMetaDataKey::encode(databaseId, DatabaseMetaDataKey::kMaxObjectStoreId);
    308308    if (!getInt(db, maxObjectStoreIdKey, maxObjectStoreId))
    309309        maxObjectStoreId = 0;
     310
     311    ASSERT(maxObjectStoreId >= 0);
    310312
    311313    int64_t objectStoreId = maxObjectStoreId + 1;
     
    642644    }
    643645
    644     int64_t maxIndexId;
     646    int64_t maxIndexId = -1;
    645647    const Vector<char> maxIndexIdKey = ObjectStoreMetaDataKey::encode(databaseId, objectStoreId, 5);
    646648    if (!getInt(db, maxIndexIdKey, maxIndexId))
    647649        maxIndexId = kMinimumIndexId;
     650
     651    ASSERT(maxIndexId >= 0);
    648652
    649653    int64_t indexId = maxIndexId + 1;
Note: See TracChangeset for help on using the changeset viewer.