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. --- amiga/dt_sound.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'amiga/dt_sound.c') diff --git a/amiga/dt_sound.c b/amiga/dt_sound.c index 2823178e2..6c49f0960 100644 --- a/amiga/dt_sound.c +++ b/amiga/dt_sound.c @@ -72,7 +72,7 @@ static const content_handler amiga_dt_sound_content_handler = { static void amiga_dt_sound_play(Object *dto) { - LOG(("Playing...")); + LOG("Playing..."); IDoMethod(dto, DTM_TRIGGER, NULL, STM_PLAY, NULL); } @@ -122,7 +122,7 @@ nserror amiga_dt_sound_create(const content_handler *handler, amiga_dt_sound_content *plugin; nserror error; - LOG(("amiga_dt_sound_create")); + LOG("amiga_dt_sound_create"); plugin = calloc(1, sizeof(amiga_dt_sound_content)); if (plugin == NULL) @@ -142,7 +142,7 @@ nserror amiga_dt_sound_create(const content_handler *handler, bool amiga_dt_sound_convert(struct content *c) { - LOG(("amiga_dt_sound_convert")); + LOG("amiga_dt_sound_convert"); amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; int width = 50, height = 50; @@ -176,7 +176,7 @@ void amiga_dt_sound_destroy(struct content *c) { amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; - LOG(("amiga_dt_sound_destroy")); + LOG("amiga_dt_sound_destroy"); DisposeDTObject(plugin->dto); @@ -194,7 +194,7 @@ bool amiga_dt_sound_redraw(struct content *c, .stroke_width = 1, }; - LOG(("amiga_dt_sound_redraw")); + LOG("amiga_dt_sound_redraw"); /* this should be some sort of play/stop control */ @@ -215,7 +215,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw, amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; struct object_param *param; - LOG(("amiga_dt_sound_open")); + LOG("amiga_dt_sound_open"); plugin->immediate = false; @@ -223,7 +223,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw, { do { - LOG(("%s = %s", param->name, param->value)); + LOG("%s = %s", param->name, param->value); if((strcmp(param->name, "autoplay") == 0) && (strcmp(param->value, "true") == 0)) plugin->immediate = true; if((strcmp(param->name, "autoStart") == 0) && @@ -244,7 +244,7 @@ nserror amiga_dt_sound_clone(const struct content *old, struct content **newc) amiga_dt_sound_content *plugin; nserror error; - LOG(("amiga_dt_sound_clone")); + LOG("amiga_dt_sound_clone"); plugin = calloc(1, sizeof(amiga_dt_sound_content)); if (plugin == NULL) -- cgit v1.2.3