Bug 39372

Summary: check-webkit-style complains about use of NULL in GTK function calls that require sentinels
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, cjerdonek, eric, hamaji, levin, pnormand
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed patch hamaji: review+

Darin Adler
Reported 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.
Attachments
proposed patch (2.51 KB, patch)
2010-05-27 02:33 PDT, Philippe Normand
hamaji: review+
Darin Adler
Comment 1 2010-05-19 11:58:04 PDT
See an example in bug 39368.
Philippe Normand
Comment 2 2010-05-27 02:33:05 PDT
Created attachment 57212 [details] proposed patch
Shinichiro Hamaji
Comment 3 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' ?
Philippe Normand
Comment 4 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 :)
Philippe Normand
Comment 5 2010-05-27 05:15:39 PDT
Note You need to log in before you can comment on or make changes to this bug.