]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Annotate methods with PrintfFormat where needed
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 14 Feb 2017 22:38:04 +0000 (23:38 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 14 Feb 2017 22:38:04 +0000 (23:38 +0100)
src/libvaladoc/errorreporter.vala
src/vapi/libgvc.vapi

index 49d2b3df309ca2f90cd9e94ac000355eaa81d7bd..5b9543e623b9f0e6c83423eeb3fb4b927f4f11dc 100644 (file)
@@ -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, ...)
        {
index b667c0072df67215722ca3ac86123ab7a5c13448..58219c8985f16c441813b7d526341f6a3b4edccf 100644 (file)
@@ -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, ...);
        }