From c105738fa36bb2400adc47399c5b878d252d1c86 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 28 May 2015 16:08:46 +0100 Subject: Change LOG() macro to be varadic This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging. --- atari/treeview.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'atari/treeview.c') diff --git a/atari/treeview.c b/atari/treeview.c index 2f99cbc8a..20ac3e7fe 100644 --- a/atari/treeview.c +++ b/atari/treeview.c @@ -326,8 +326,7 @@ static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]) on_keybd_event(cw, ev_out, msg); } if( (ev_out->emo_events & MU_BUTTON) != 0 ) { - LOG(("Treeview click at: %d,%d\n", ev_out->emo_mouse.p_x, - ev_out->emo_mouse.p_y)); + LOG("Treeview click at: %d,%d\n", ev_out->emo_mouse.p_x, ev_out->emo_mouse.p_y); on_mbutton_event(cw, ev_out, msg); } @@ -528,7 +527,7 @@ atari_treeview_create(GUIWIN *win, struct atari_treeview_callbacks * callbacks, tv = calloc(1, sizeof(struct atari_treeview_window)); if (tv == NULL) { - LOG(("calloc failed")); + LOG("calloc failed"); warn_user(messages_get_errorcode(NSERROR_NOMEM), 0); return NULL; } -- cgit v1.2.3