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. --- beos/fetch_rsrc.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'beos/fetch_rsrc.cpp') diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp index 67d0f3555..ceed7d25e 100644 --- a/beos/fetch_rsrc.cpp +++ b/beos/fetch_rsrc.cpp @@ -70,13 +70,13 @@ BResources *gAppResources = NULL; static bool fetch_rsrc_initialise(lwc_string *scheme) { - LOG(("fetch_rsrc_initialise called for %s", lwc_string_data(scheme))); + LOG("fetch_rsrc_initialise called for %s", lwc_string_data(scheme)); return true; } static void fetch_rsrc_finalise(lwc_string *scheme) { - LOG(("fetch_rsrc_finalise called for %s", lwc_string_data(scheme))); + LOG("fetch_rsrc_finalise called for %s", lwc_string_data(scheme)); } static bool fetch_rsrc_can_fetch(const nsurl *url) @@ -277,8 +277,7 @@ static void fetch_rsrc_poll(lwc_string *scheme) char header[64]; fetch_set_http_code(c->parent_fetch, 200); - LOG(("setting rsrc: MIME type to %s, length to %zd", - c->mimetype, c->datalen)); + LOG("setting rsrc: MIME type to %s, length to %zd", c->mimetype, c->datalen); /* Any callback can result in the fetch being aborted. * Therefore, we _must_ check for this after _every_ * call to fetch_rsrc_send_callback(). @@ -308,7 +307,7 @@ static void fetch_rsrc_poll(lwc_string *scheme) fetch_rsrc_send_callback(&msg, c); } } else { - LOG(("Processing of %s failed!", c->url)); + LOG("Processing of %s failed!", c->url); /* Ensure that we're unlocked here. If we aren't, * then fetch_rsrc_process() is broken. -- cgit v1.2.3