[lasem] debug: use G_GNUC_PRINTF for debug functions



commit 03a4a01e410244fad821b2ff4c7265600f0f39b4
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon May 5 22:05:09 2014 +0200

    debug: use G_GNUC_PRINTF for debug functions
    
    And fix a legitimate warning.

 src/lsmdebug.h     |    6 +++---
 src/lsmdomparser.c |    6 +++---
 src/lsmsvgview.c   |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/lsmdebug.h b/src/lsmdebug.h
index 2a425d0..85f2cfc 100644
--- a/src/lsmdebug.h
+++ b/src/lsmdebug.h
@@ -60,9 +60,9 @@ extern LsmDebugCategory lsm_debug_category_viewport;
 #define lsm_log_render(...)            lsm_log (&lsm_debug_category_render, __VA_ARGS__)
 #define lsm_warning_render(...)                lsm_warning (&lsm_debug_category_render, __VA_ARGS__)
 
-void           lsm_warning                     (LsmDebugCategory *category, const char *format, ...);
-void           lsm_debug                       (LsmDebugCategory *category, const char *format, ...);
-void           lsm_log                         (LsmDebugCategory *category, const char *format, ...);
+void           lsm_warning                     (LsmDebugCategory *category, const char *format, ...) 
G_GNUC_PRINTF(2,3);
+void           lsm_debug                       (LsmDebugCategory *category, const char *format, ...) 
G_GNUC_PRINTF(2,3);
+void           lsm_log                         (LsmDebugCategory *category, const char *format, ...) 
G_GNUC_PRINTF(2,3);
 
 gboolean       lsm_debug_check                 (LsmDebugCategory *category, LsmDebugLevel level);
 
diff --git a/src/lsmdomparser.c b/src/lsmdomparser.c
index fb84ff0..a1af8f7 100644
--- a/src/lsmdomparser.c
+++ b/src/lsmdomparser.c
@@ -202,7 +202,7 @@ lsm_dom_parser_warning (void *user_data, const char *msg, ...)
        va_list args;
 
        va_start(args, msg);
-       lsm_warning_dom (msg);
+       lsm_warning_dom ("%s", msg);
        va_end(args);
 }
 
@@ -212,7 +212,7 @@ lsm_dom_parser_error (void *user_data, const char *msg, ...)
        va_list args;
 
        va_start(args, msg);
-       lsm_warning_dom (msg);
+       lsm_warning_dom ("%s", msg);
        va_end(args);
 }
 
@@ -222,7 +222,7 @@ lsm_dom_parser_fatal_error (void *user_data, const char *msg, ...)
        va_list args;
 
        va_start(args, msg);
-       lsm_warning_dom (msg);
+       lsm_warning_dom ("%s", msg);
        va_end(args);
 }
 
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index 5eecae4..1379ded 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -1256,7 +1256,7 @@ _show_text (LsmSvgView *view,
 
        style = view->style;
 
-       lsm_debug_render ("[LsmSvgView::show_text] Show '%s' at %g,%g (%g px)", string, x, y, 
style->font_size_px);
+       lsm_debug_render ("[LsmSvgView::show_text] Show '%s' at %g,%g (%g px)", string, *x, *y, 
style->font_size_px);
 
        need_pop = _lock_pango_layout (view);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]