From: Rico Tzschichholz Date: Tue, 14 Feb 2017 22:38:04 +0000 (+0100) Subject: Annotate methods with PrintfFormat where needed X-Git-Tag: 0.37.1~3^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d28baf45f36d7523c7c408a294d0358dd7cd9423;p=thirdparty%2Fvala.git Annotate methods with PrintfFormat where needed --- diff --git a/src/libvaladoc/errorreporter.vala b/src/libvaladoc/errorreporter.vala index 49d2b3df3..5b9543e62 100644 --- a/src/libvaladoc/errorreporter.vala +++ b/src/libvaladoc/errorreporter.vala @@ -249,6 +249,7 @@ public class Valadoc.ErrorReporter : Object { return func (fd) == 1; } + [PrintfFormat] private inline void msg (string type, string type_color_start, string type_color_end, string file, long line, long startpos, long endpos, string errline, string msg_format, va_list args) { @@ -306,6 +307,7 @@ public class Valadoc.ErrorReporter : Object { this.stream.puts (message.offset (start)); } + [PrintfFormat] public void simple_warning (string? location, string msg_format, ...) { var args = va_list(); @@ -325,6 +327,7 @@ public class Valadoc.ErrorReporter : Object { this._warnings++; } + [PrintfFormat] public void simple_error (string? location, string msg_format, ...) { var args = va_list(); @@ -345,6 +348,7 @@ public class Valadoc.ErrorReporter : Object { this._errors++; } + [PrintfFormat] public void simple_note (string? location, string msg_format, ...) { if (_settings == null || _settings.verbose) { var args = va_list(); @@ -367,6 +371,7 @@ public class Valadoc.ErrorReporter : Object { } } + [PrintfFormat] public void error (string file, long line, long startpos, long endpos, string errline, string msg_format, ...) { @@ -375,6 +380,7 @@ public class Valadoc.ErrorReporter : Object { this._errors++; } + [PrintfFormat] public void warning (string file, long line, long startpos, long endpos, string errline, string msg_format, ...) { diff --git a/src/vapi/libgvc.vapi b/src/vapi/libgvc.vapi index b667c0072..58219c898 100644 --- a/src/vapi/libgvc.vapi +++ b/src/vapi/libgvc.vapi @@ -213,6 +213,7 @@ namespace Gvc { public static ErrorLevel errno; [CCode (cname = "agerr")] + [PrintfFormat] public static int error (ErrorLevel level, string fmt, ...); [CCode (cname = "agerrors")] @@ -225,9 +226,11 @@ namespace Gvc { public static string? last_error (); [CCode (cname = "agerrorf")] + [PrintfFormat] public static void errorf (string format, ...); [CCode (cname = "agwarningf")] + [PrintfFormat] void warningf (string fmt, ...); }