diff mbox

qjson.h: Remove GCC_FMT_ATTR markup from qobject_from_jsonv() declaration

Message ID 1394053327-27964-1-git-send-email-sw@weilnetz.de
State New
Headers show

Commit Message

Stefan Weil March 5, 2014, 9:02 p.m. UTC
Commit aa830cdc28edb69c1fe81c8fd9471ab288ad0926 removed that attribute
from qobject_from_json. Now gcc suggests to add it again when compiler
flag -Wmissing-format-attribute is used:

qobject/qjson.c: In function ‘qobject_from_json’:
qobject/qjson.c:53:5: error:
 function might be possible candidate for ‘gnu_printf’ format attribute
 [-Werror=suggest-attribute=format]

Fix this by removing the flag from qobject_from_jsonv, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

Maybe the last remaining GCC_FMT_ATTR should be removed, too. Please review.

Regards,
Stefan Weil

 include/qapi/qmp/qjson.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h
index ee4d31a..e122380 100644
--- a/include/qapi/qmp/qjson.h
+++ b/include/qapi/qmp/qjson.h
@@ -21,7 +21,7 @@ 
 
 QObject *qobject_from_json(const char *string);
 QObject *qobject_from_jsonf(const char *string, ...) GCC_FMT_ATTR(1, 2);
-QObject *qobject_from_jsonv(const char *string, va_list *ap) GCC_FMT_ATTR(1, 0);
+QObject *qobject_from_jsonv(const char *string, va_list *ap);
 
 QString *qobject_to_json(const QObject *obj);
 QString *qobject_to_json_pretty(const QObject *obj);