From e66aaecc057ef417d0dd1d0b94454f6704147e7f Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 2 Sep 2009 12:01:27 -0400 Subject: PR10589: switch to kernel vscnprintf for _stp_{dbug,warn,error} calls in runtime _stp_vscnprintf is only suitable for calls from the script, with slightly different conventions (64-bit ints/pointers, extra formatting directives). * runtime/runtime.h (_stp_{dbug,warn,error}): Add __attribute__ format(printf). * runtime/io.c (_stp_vlog): Ditto. Use vscnprintf(). * runtime/sym.c (_stp_module_check): Remove hexdumping (%.*M) of mismatching buildids. Switch to _stp_warn from printk (KERN_WARNING). * translate.cxx, runtime/unwind.c: Numerous print formatting tweaks. --- runtime/runtime.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/runtime.h') diff --git a/runtime/runtime.h b/runtime/runtime.h index c3bf501d..064ded7b 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -48,9 +48,9 @@ #define stp_for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) #endif -static void _stp_dbug (const char *func, int line, const char *fmt, ...); -static void _stp_error (const char *fmt, ...); -static void _stp_warn (const char *fmt, ...); +static void _stp_dbug (const char *func, int line, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); +static void _stp_error (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +static void _stp_warn (const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); static void _stp_exit(void); -- cgit