Annotate more printf-like functions. Disable non-literal format string

warnings for a couple of broken APIs where a format string is given
without the actual argument. Bump revision.
This commit is contained in:
joerg 2015-08-10 19:30:06 +00:00
parent f8da6254cf
commit c719715ec0
7 changed files with 106 additions and 2 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.16 2015/08/04 11:57:50 he Exp $
# $NetBSD: Makefile,v 1.17 2015/08/10 19:30:06 joerg Exp $
DISTNAME= goffice-0.10.21
PKGNAME= ${DISTNAME:S/goffice/goffice0.10/}
PKGREVISION= 1
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/goffice/0.10/}
EXTRACT_SUFX= .tar.xz

View file

@ -1,6 +1,11 @@
$NetBSD: distinfo,v 1.9 2015/08/04 11:57:50 he Exp $
$NetBSD: distinfo,v 1.10 2015/08/10 19:30:06 joerg Exp $
SHA1 (goffice-0.10.21.tar.xz) = 1959dd0f7e52ffbfdeb49810f989b243ef53cbae
RMD160 (goffice-0.10.21.tar.xz) = a595e843d75eebc0bfba3082647743900c6bd21c
Size (goffice-0.10.21.tar.xz) = 2336136 bytes
SHA1 (patch-gofffice_app_io-context.h) = b8aceae57a06af6873cbf0219b255ce9b9627d84
SHA1 (patch-goffice_app_error-info.h) = 6273b5d9a95bb5d45aaa9369271f7476d74f6b0a
SHA1 (patch-goffice_math_go-complex.c) = f9a7b429c04b25014f2bfa998b2ad09db8c2bcfa
SHA1 (patch-goffice_math_go-dtoa.c) = d08bc7f76e5e8c3b41fbba2bfce6fedcfc4f5f27
SHA1 (patch-goffice_math_go-matrix.c) = 3d7be1540defaefbd2facc2c85b31938e0c5cac0
SHA1 (patch-goffice_utils_go-glib-extras.c) = ed27e08c67a9341a43f24a23a1f97c4851d8cd3d

View file

@ -0,0 +1,13 @@
$NetBSD: patch-gofffice_app_io-context.h,v 1.1 2015/08/10 19:30:06 joerg Exp $
--- goffice/app/io-context.h.orig 2015-08-10 16:19:57.000000000 +0000
+++ goffice/app/io-context.h
@@ -43,7 +43,7 @@ void go_io_progress_unset (GO
void go_io_context_set_num_files (GOIOContext *ioc, guint count);
void go_io_context_processing_file (GOIOContext *ioc, char const *uri);
void go_io_warning (GOIOContext *ioc, char const *fmt, ...) G_GNUC_PRINTF (2, 3);
-void go_io_warning_varargs (GOIOContext *ioc, char const *fmt, va_list args);
+void go_io_warning_varargs (GOIOContext *ioc, char const *fmt, va_list args) G_GNUC_PRINTF (2, 0);
void go_io_warning_unknown_font (GOIOContext *ioc, char const *font_name);
void go_io_warning_unknown_function (GOIOContext *ioc, char const *funct_name);
void go_io_warning_unsupported_feature (GOIOContext *ioc, char const *feature);

View file

@ -0,0 +1,13 @@
$NetBSD: patch-goffice_app_error-info.h,v 1.1 2015/08/10 19:30:06 joerg Exp $
--- goffice/app/error-info.h.orig 2015-08-10 16:17:07.000000000 +0000
+++ goffice/app/error-info.h
@@ -16,7 +16,7 @@ GOErrorInfo *go_error_info_new_str (ch
GOErrorInfo *go_error_info_new_printf (char const *msg_format, ...) G_GNUC_PRINTF (1, 2);
GOErrorInfo *go_error_info_new_vprintf (GOSeverity severity,
char const *msg_format,
- va_list args);
+ va_list args) G_GNUC_PRINTF (2, 0);
GOErrorInfo *go_error_info_new_str_with_details (char const *msg, GOErrorInfo *details);
GOErrorInfo *go_error_info_new_str_with_details_list (char const *msg, GSList *details);
GOErrorInfo *go_error_info_new_from_error_list (GSList *errors);

View file

@ -0,0 +1,23 @@
$NetBSD: patch-goffice_math_go-complex.c,v 1.1 2015/08/10 19:30:06 joerg Exp $
Format string is passed in as argument.
--- goffice/math/go-complex.c.orig 2015-08-10 16:25:07.000000000 +0000
+++ goffice/math/go-complex.c
@@ -58,6 +58,8 @@
#define COMPLEX SUFFIX(GOComplex)
/* ------------------------------------------------------------------------- */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
char *
SUFFIX(go_complex_to_string) (COMPLEX const *src, char const *reformat,
@@ -103,6 +105,7 @@ SUFFIX(go_complex_to_string) (COMPLEX co
return res;
}
+#pragma GCC diagnostic pop
/* ------------------------------------------------------------------------- */

View file

@ -0,0 +1,24 @@
$NetBSD: patch-goffice_math_go-matrix.c,v 1.1 2015/08/10 19:30:06 joerg Exp $
Format string is passed in as argument.
--- goffice/math/go-matrix.c.orig 2015-08-10 16:26:04.000000000 +0000
+++ goffice/math/go-matrix.c
@@ -581,6 +581,8 @@ SUFFIX(go_quad_matrix_eigen_range) (cons
}
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
void
SUFFIX(go_quad_matrix_dump) (const QMATRIX *A, const char *fmt)
@@ -594,6 +596,8 @@ SUFFIX(go_quad_matrix_dump) (const QMATR
}
}
+#pragma GCC diagnostic pop
+
/* -------------------------------------------------------------------------- */
/**

View file

@ -0,0 +1,25 @@
$NetBSD: patch-goffice_utils_go-glib-extras.c,v 1.1 2015/08/10 19:30:06 joerg Exp $
Format string is passed in as argument.
--- goffice/utils/go-glib-extras.c.orig 2015-08-10 16:27:43.000000000 +0000
+++ goffice/utils/go-glib-extras.c
@@ -893,6 +893,8 @@ go_object_toggle (gpointer object, const
g_object_set (object, property_name, !value, NULL);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
gboolean
go_object_set_property (GObject *obj, const char *property_name,
@@ -963,8 +965,7 @@ go_object_set_property (GObject *obj, co
return TRUE;
}
-
-
+#pragma GCC diagnostic pop
/**
* go_object_properties_collect: