[valadoc] Annotate methods with PrintfFormat where needed
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] Annotate methods with PrintfFormat where needed
- Date: Tue, 14 Feb 2017 22:39:57 +0000 (UTC)
commit d28baf45f36d7523c7c408a294d0358dd7cd9423
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Feb 14 23:38:04 2017 +0100
Annotate methods with PrintfFormat where needed
src/libvaladoc/errorreporter.vala | 6 ++++++
src/vapi/libgvc.vapi | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libvaladoc/errorreporter.vala b/src/libvaladoc/errorreporter.vala
index 49d2b3d..5b9543e 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 b667c00..58219c8 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, ...);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]