WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-51758-20101230122005.patch (text/plain), 2.65 KB, created by
Martin Robinson
on 2010-12-30 12:20:06 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Martin Robinson
Created:
2010-12-30 12:20:06 PST
Size:
2.65 KB
patch
obsolete
>diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 54e7fdcbf7ea94334540c6ea33eca4adaa11ef5a..07a8076f4e13cbf1f757a8d2385b400f0b3ffb34 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2010-12-30 Martin Robinson <mrobinson@igalia.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ check-webkit-style should ignore NULL usage in calls to gtk_widget_style_get >+ https://bugs.webkit.org/show_bug.cgi?id=51758 >+ >+ Add a check-webkit-style exception for gtk_widget_style_get and NULL usage. >+ >+ * Scripts/webkitpy/style/checkers/cpp.py: Add the exception. >+ * Scripts/webkitpy/style/checkers/cpp_unittest.py: Add some tests for this. >+ > 2010-12-29 Martin Robinson <mrobinson@igalia.com> > > Reviewed by Ojan Vafai. >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py >index 902a0a1ba7bb067691415eb22d963dc8367f2bed..58c13df90c7e7c8e7cd33f94dc14fc755dc16faa 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py >@@ -2283,6 +2283,10 @@ def check_for_null(clean_lines, line_number, file_state, error): > if search(r'\bgdk_pixbuf_save_to\w+\b', line): > return > >+ # Don't warn about NULL usage in gtk_widget_style_get(). See Bug 51758. >+ if search(r'\bgtk_widget_style_get\(\w+\b', line): >+ return >+ > if search(r'\bNULL\b', line): > error(line_number, 'readability/null', 5, 'Use 0 instead of NULL.') > return >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >index 8ee73fee5855fd854f5184182bd823bbee279fdf..5746ef3e587e45019f71f9d6513ef3631c7291c2 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >@@ -3858,6 +3858,17 @@ class WebKitStyleTest(CppStyleTestBase): > self.assert_lint( > 'gchar* result = gdk_pixbuf_save_to_stream(pixbuf, function, data, type, error, NULL);', > '') >+ self.assert_lint( >+ 'gtk_widget_style_get(style, "propertyName", &value, "otherName", &otherValue, NULL);', >+ '') >+ self.assert_lint( >+ 'gtk_widget_style_get_property(style, NULL, NULL);', >+ 'Use 0 instead of NULL. [readability/null] [5]', >+ 'foo.cpp') >+ self.assert_lint( >+ 'gtk_widget_style_get_valist(style, NULL, NULL);', >+ 'Use 0 instead of NULL. [readability/null] [5]', >+ 'foo.cpp') > > # 2. C++ and C bool values should be written as true and > # false. Objective-C BOOL values should be written as YES and NO.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
darin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 51758
: 77695