Bug 39372 - check-webkit-style complains about use of NULL in GTK function calls that require sentinels
Summary: check-webkit-style complains about use of NULL in GTK function calls that req...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 11:57 PDT by Darin Adler
Modified: 2010-05-27 05:15 PDT (History)
6 users (show)

See Also:


Attachments
proposed patch (2.51 KB, patch)
2010-05-27 02:33 PDT, Philippe Normand
hamaji: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2010-05-19 11:57:42 PDT
Various GTK calls have variable arguments that are pointers, and then have to end with a sentinel. The sentinel must be NULL, not 0. But check-webkit-style complains, saying that the NULL should instead be 0.
Comment 1 Darin Adler 2010-05-19 11:58:04 PDT
See an example in bug 39368.
Comment 2 Philippe Normand 2010-05-27 02:33:05 PDT
Created attachment 57212 [details]
proposed patch
Comment 3 Shinichiro Hamaji 2010-05-27 03:01:18 PDT
Comment on attachment 57212 [details]
proposed patch

Looks good, but it would be better if we can limit the symbols. How about r'\bg_[a-z]+_[a-z]+\b', r'\bg_[a-z]+(_[a-z]+)+\b', or r'\bg(_[a-z]+)+\b' ?
Comment 4 Philippe Normand 2010-05-27 05:10:30 PDT
(In reply to comment #3)
> (From update of attachment 57212 [details])
> Looks good, but it would be better if we can limit the symbols. How about r'\bg_[a-z]+_[a-z]+\b', r'\bg_[a-z]+(_[a-z]+)+\b', or r'\bg(_[a-z]+)+\b' ?

Yeah, I like option #3. Will update the patch and land it, thanks for the review :)
Comment 5 Philippe Normand 2010-05-27 05:15:39 PDT
Landed in r60293 <http://trac.webkit.org/changeset/60293>

Thanks!