]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Don't warn about unused internal methods which are meant to be visible on DBus
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 13 Feb 2018 09:37:03 +0000 (10:37 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 14 Feb 2018 10:32:57 +0000 (11:32 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=593902

vala/valaflowanalyzer.vala

index 3683b817f29c607960d8d8f27774678d6eb625e9..a6e86dc687225301e4b4e97b1d0ac548978bb3d2 100644 (file)
@@ -168,6 +168,9 @@ public class Vala.FlowAnalyzer : CodeVisitor {
                    && !(m is CreationMethod)) {
                        if (!m.is_private_symbol () && (context.internal_header_filename != null || context.use_fast_vapi)) {
                                // do not warn if internal member may be used outside this compilation unit
+                       } else if (m.parent_symbol != null && m.parent_symbol.get_attribute ("DBus") != null
+                           && m.get_attribute_bool ("DBus", "visible", true)) {
+                               // do not warn if internal member is a visible DBus method
                        } else {
                                Report.warning (m.source_reference, "method `%s' never used".printf (m.get_full_name ()));
                        }