From: Rico Tzschichholz Date: Tue, 13 Feb 2018 09:37:03 +0000 (+0100) Subject: Don't warn about unused internal methods which are meant to be visible on DBus X-Git-Tag: 0.34.17~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a438de5563e8649b6466b5a285b9cb77be008ee;p=thirdparty%2Fvala.git Don't warn about unused internal methods which are meant to be visible on DBus https://bugzilla.gnome.org/show_bug.cgi?id=593902 --- diff --git a/vala/valaflowanalyzer.vala b/vala/valaflowanalyzer.vala index 9f94a42ca..07b2ad539 100644 --- a/vala/valaflowanalyzer.vala +++ b/vala/valaflowanalyzer.vala @@ -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 ())); }