* [Qemu-devel] [PATCH] trace: Use fprintf_function (format checking)
@ 2010-11-15 20:17 Stefan Weil
2010-11-21 15:21 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2010-11-15 20:17 UTC (permalink / raw)
To: QEMU Developers; +Cc: Blue Swirl
fprintf_function adds format checking with GCC_FMT_ATTR.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
simpletrace.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/simpletrace.h b/simpletrace.h
index 72614ec..2f44ed3 100644
--- a/simpletrace.h
+++ b/simpletrace.h
@@ -29,10 +29,10 @@ void trace3(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3);
void trace4(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4);
void trace5(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5);
void trace6(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5, uint64_t x6);
-void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
-void st_print_trace_events(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
+void st_print_trace(FILE *stream, fprintf_function stream_printf);
+void st_print_trace_events(FILE *stream, fprintf_function stream_printf);
bool st_change_trace_event_state(const char *tname, bool tstate);
-void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
+void st_print_trace_file_status(FILE *stream, fprintf_function stream_printf);
void st_set_trace_file_enabled(bool enable);
bool st_set_trace_file(const char *file);
void st_flush_trace_buffer(void);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] trace: Use fprintf_function (format checking)
2010-11-15 20:17 [Qemu-devel] [PATCH] trace: Use fprintf_function (format checking) Stefan Weil
@ 2010-11-21 15:21 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-11-21 15:21 UTC (permalink / raw)
To: Stefan Weil; +Cc: Blue Swirl, QEMU Developers
On 11/15/2010 02:17 PM, Stefan Weil wrote:
> fprintf_function adds format checking with GCC_FMT_ATTR.
>
> Cc: Blue Swirl<blauwirbel@gmail.com>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> simpletrace.h | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/simpletrace.h b/simpletrace.h
> index 72614ec..2f44ed3 100644
> --- a/simpletrace.h
> +++ b/simpletrace.h
> @@ -29,10 +29,10 @@ void trace3(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3);
> void trace4(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4);
> void trace5(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5);
> void trace6(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4, uint64_t x5, uint64_t x6);
> -void st_print_trace(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
> -void st_print_trace_events(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
> +void st_print_trace(FILE *stream, fprintf_function stream_printf);
> +void st_print_trace_events(FILE *stream, fprintf_function stream_printf);
> bool st_change_trace_event_state(const char *tname, bool tstate);
> -void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...));
> +void st_print_trace_file_status(FILE *stream, fprintf_function stream_printf);
> void st_set_trace_file_enabled(bool enable);
> bool st_set_trace_file(const char *file);
> void st_flush_trace_buffer(void);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-21 15:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 20:17 [Qemu-devel] [PATCH] trace: Use fprintf_function (format checking) Stefan Weil
2010-11-21 15:21 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).