Bug 61026 - Don't use DEFINE_STATIC_LOCAL with an unsigned
Summary: Don't use DEFINE_STATIC_LOCAL with an unsigned
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 00:28 PDT by Pratik Solanki
Modified: 2011-05-18 09:13 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.47 KB, patch)
2011-05-18 00:32 PDT, Pratik Solanki
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2011-05-18 00:28:23 PDT
StorageTracker.cpp has

    DEFINE_STATIC_LOCAL(const unsigned, fileExtLength, (fileExt.length()));

DEFINE_STATIC_LOCAL is meant for objects, not unsigned ints. We can just use static here.
Comment 1 Pratik Solanki 2011-05-18 00:32:33 PDT
Created attachment 93879 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-05-18 07:55:02 PDT
I wonder if we could make it compile error to use DEFINE_STATIC_LOCAL on POD types?
Comment 3 Pratik Solanki 2011-05-18 09:13:16 PDT
Committed r86772: <http://trac.webkit.org/changeset/86772>