WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23115
Create a version of ASSERT for use with otherwise unused variables
https://bugs.webkit.org/show_bug.cgi?id=23115
Summary
Create a version of ASSERT for use with otherwise unused variables
Alexey Proskuryakov
Reported
2009-01-05 01:51:25 PST
We have several ways to assert on otherwise unused variables, none of with is elegant enough: 1) if (!expr) ASSERT_NOT_REACHED(); 2) UNUSED_PARAM(); 3) #ifndef NDEBUG int result = #endif function(); ASSERT(!result) Darin suggested adding a macro just for this purpose that would combine ASSERT and UNUSED_PARAM.
Attachments
proposed patch
(9.52 KB, patch)
2009-01-05 01:54 PST
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2009-01-05 01:54:56 PST
Created
attachment 26428
[details]
proposed patch
Darin Adler
Comment 2
2009-01-05 07:23:20 PST
Comment on
attachment 26428
[details]
proposed patch This is great. I'm a little worried that the name, "ASSERT_UNUSED", will make people thing we're asserting that something is unused. But only a little worried, not a lot. r=me
Alexey Proskuryakov
Comment 3
2009-01-05 09:21:47 PST
Committed revision 39600.
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