WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
167844
Static Analyzer: Value stored to 'prev' is never read
https://bugs.webkit.org/show_bug.cgi?id=167844
Summary
Static Analyzer: Value stored to 'prev' is never read
Joseph Pecoraro
Reported
2017-02-04 16:38:30 PST
Seeing this static analyzer warning all over JavaScriptCore: Source/JavaScriptCore/runtime/JSMapIterator.h:60:13: warning: Value stored to 'prev' is never read prev = bucket; ^ ~~~~~~ Source/JavaScriptCore/runtime/JSSetIterator.h:60:13: warning: Value stored to 'prev' is never read prev = bucket; ^ ~~~~~~ 2 warnings generated.
Attachments
[PATCH] Proposed Fix
(2.40 KB, patch)
2017-02-04 16:39 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2017-02-04 16:39:17 PST
Created
attachment 300646
[details]
[PATCH] Proposed Fix
Saam Barati
Comment 2
2017-02-04 16:47:39 PST
Comment on
attachment 300646
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=300646&action=review
r=me
> Source/JavaScriptCore/runtime/JSMapIterator.h:59 > + while (bucket && bucket->deleted())
Oh wow. Can you add a test that would cause this to infinite loop? I don't think it'd be hard. Perhaps something like this: - add three entries to a map - get an iterator to give result of the first entry - delete all entries - call next
Radar WebKit Bug Importer
Comment 3
2017-02-04 16:48:21 PST
<
rdar://problem/30364994
>
Saam Barati
Comment 4
2017-02-04 17:02:46 PST
Comment on
attachment 300646
[details]
[PATCH] Proposed Fix Ignore my previous comment, I misread the diff, thinking that bucket = bucket->next() was only just now added.
WebKit Commit Bot
Comment 5
2017-02-04 17:27:54 PST
Comment on
attachment 300646
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 300646 Committed
r211675
: <
http://trac.webkit.org/changeset/211675
>
WebKit Commit Bot
Comment 6
2017-02-04 17:27:58 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug