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. --- render/table.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'render/table.c') diff --git a/render/table.c b/render/table.c index 22b5afd37..656386491 100644 --- a/render/table.c +++ b/render/table.c @@ -220,10 +220,13 @@ bool table_calculate_column_types(struct box *table) #ifdef TABLE_DEBUG for (i = 0; i != table->columns; i++) - LOG(("table %p, column %u: type %s, width %i", table, i, - ((const char *[]) {"UNKNOWN", "FIXED", "AUTO", - "PERCENT", "RELATIVE"})[col[i].type], - col[i].width)); + LOG("table %p, column %u: type %s, width %i", table, i, ((const char *[]){ + "UNKNOWN", + "FIXED", + "AUTO", + "PERCENT", + "RELATIVE" + })[col[i].type], col[i].width); #endif return true; -- cgit v1.2.3