Rev 75: Add the __attribute__ magic so that gcc will generate warnings in http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 11 16:20:52 BST 2009
At http://bazaar.launchpad.net/~meliae-dev/meliae/trunk
------------------------------------------------------------
revno: 75
revision-id: john at arbash-meinel.com-20090911152035-twwbnvbndmunotpq
parent: john at arbash-meinel.com-20090911150934-m7krgjyi2fm2bosm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Fri 2009-09-11 10:20:35 -0500
message:
Add the __attribute__ magic so that gcc will generate warnings
when we screw up formatting.
-------------- next part --------------
=== modified file 'meliae/_scanner_core.c'
--- a/meliae/_scanner_core.c 2009-09-11 15:09:34 +0000
+++ b/meliae/_scanner_core.c 2009-09-11 15:20:35 +0000
@@ -47,6 +47,12 @@
void _dump_object_to_ref_info(struct ref_info *info, PyObject *c_obj,
int recurse);
+#ifdef __GNUC__
+void _write_to_ref_info(struct ref_info *info, const char *fmt_string, ...)
+ __attribute__((format(printf, 2, 3)));
+#else
+void _write_to_ref_info(struct ref_info *info, const char *fmt_string, ...);
+#endif
Py_ssize_t
_basic_object_size(PyObject *c_obj)
@@ -141,9 +147,6 @@
}
-/* TODO: figure out the GCC magic macro to make it clear this is essentially a
- * printf function. So that it checks argument types, etc.
- */
void
_write_to_ref_info(struct ref_info *info, const char *fmt_string, ...)
{
More information about the bazaar-commits
mailing list