summaryrefslogtreecommitdiff
path: root/riscos/gui/progress_bar.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /riscos/gui/progress_bar.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
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.
Diffstat (limited to 'riscos/gui/progress_bar.c')
-rw-r--r--riscos/gui/progress_bar.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c
index 09b3edb45..3ec6b3aa8 100644
--- a/riscos/gui/progress_bar.c
+++ b/riscos/gui/progress_bar.c
@@ -137,8 +137,7 @@ struct progress_bar *ro_gui_progress_bar_create(void)
error = xwimp_create_window((wimp_window *)&progress_bar_definition,
&pb->w);
if (error) {
- LOG(("xwimp_create_window: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_create_window: 0x%x: %s", error->errnum, error->errmess);
free(pb);
return NULL;
}
@@ -166,8 +165,7 @@ void ro_gui_progress_bar_destroy(struct progress_bar *pb)
ro_gui_wimp_event_finalise(pb->w);
error = xwimp_delete_window(pb->w);
if (error) {
- LOG(("xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess));
+ LOG("xwimp_delete_window: 0x%x:%s", error->errnum, error->errmess);
}
free(pb);
@@ -329,8 +327,7 @@ void ro_gui_progress_bar_update(struct progress_bar *pb, int width, int height)
redraw.box.x0 = cur.x1;
error = xwimp_update_window(&redraw, &more);
if (error) {
- LOG(("Error getting update window: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("Error getting update window: 0x%x: %s", error->errnum, error->errmess);
return;
}
if (more)
@@ -354,8 +351,7 @@ void ro_gui_progress_bar_redraw(wimp_draw *redraw)
error = xwimp_redraw_window(redraw, &more);
if (error) {
- LOG(("xwimp_redraw_window: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_redraw_window: 0x%x: %s", error->errnum, error->errmess);
return;
}
if (more)
@@ -389,7 +385,7 @@ void ro_gui_progress_bar_animate(void *p)
redraw.box = pb->visible;
error = xwimp_update_window(&redraw, &more);
if (error != NULL) {
- LOG(("Error getting update window: '%s'", error->errmess));
+ LOG("Error getting update window: '%s'", error->errmess);
return;
}
if (more)
@@ -532,8 +528,7 @@ void ro_gui_progress_bar_redraw_window(wimp_draw *redraw,
}
error = xwimp_get_rectangle(redraw, &more);
if (error) {
- LOG(("xwimp_get_rectangle: 0x%x: %s",
- error->errnum, error->errmess));
+ LOG("xwimp_get_rectangle: 0x%x: %s", error->errnum, error->errmess);
return;
}
}